Reputation: 163
I'm trying to add facebook like to a site using xfbml, I've been following the guidelines from here.
The page is based on JSP's and I'm doing the xfbml setup at the end of a header.jsp file which is included at the start of the body tag. I'm providing meta tags using open graph for title, description, and image, but these are parameters passed into the header.
For some reason, the facebook like button once clicked for one page then appears to be liked for all other pages in the same context.
I'm not sure what I'm doing wrong, any help would be much appreciated, thanks in advance.
Upvotes: 0
Views: 818
Reputation: 815
<div id="fb-root" ></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.3";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
Try Using This.
Upvotes: 0