Skip to content Skip to sidebar Skip to footer

Same Facebook Like Button Over Multiple Pages?

What is considered the best method for 'like' buttons (same for twitter and google+) so that multiple pages use the same one? If i have an article spanned over several pages, it's

Solution 1:

when you get the like button you will get the codes something like this in HTML5 Tab

<div class="fb-like" data-href="http://www.example.com" data-send="false" data-width="450" data-show-faces="true"></div>

Just note the data-href="http://www.example.com" attribute,
now what to do, just get the parameter from the url something like http://www.example.com/post/first-post/ and set this value in data-href attribute.


Post a Comment for "Same Facebook Like Button Over Multiple Pages?"