I have a requirement that in a webpage I have multiple block of content which is wrapped inside individual DIV. Each block needs to have a share to facebook button. Did many researches but couldn't find a solution. Please can anyone give me a suitable code or idea how I can share particular blocks/content wrapped inside a div into facebook.
For e.g. I have three DIV in my page and each DIV has share button, when user clicks on any of the share button the respective DIV is shared.
Is there any solution to this requirement or whether is it possible to do. Any kind of suggestions are widely accepted.
To generate a Facebook Share Button, visit https://developers.facebook.com/docs/plugins/share-button and specify the URL you want people to share as well as the width. Then generate the code, and paste it into your site where you want the button to appear.
Check out this HyperArts tutorial on adding a Share Button to an iFrame tab - you use the exact same code for your webpage. You will be using the Facebook JavaScript SDK.
At the end of the tutorial it explains how to modify it to allow for multiple Share buttons on one page. You just need to add a unique identifier for each one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With