Facebook og:url ignored in favour of a Facebook hosted page about the og entity

Posted by Dan on Stack Overflow See other posts from Stack Overflow or by Dan
Published on 2012-06-18T07:23:16Z Indexed on 2012/06/18 9:16 UTC
Read the original article Hit count: 354

I am trying to implement the Like button on my pages.

Those pages represent the review page for a product. When a user Likes the page, it shows up in Facebook (not as a link, but as liking an entity), however when you click on the entity in Facebook it links through to a facebook.com hosted page representing the page. I want the user to be redirected to the og:url page?

This happens for example when you Like an artist page on Grroveshar: http://grooveshark.com/#!/artist/Elbow/4795

I am clearly "doing it wrong".

I am using the following markup to include the SDK. MYAPPID is included by the code generator Facebook provides so I assume it is required.

<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_US/all.js#xfbml=1&appId=MYAPPID";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

Then my code to render the Like button.

<div class="fb-like" data-send="false" data-width="450" data-show-faces="true"></div>

And finally my og tags:

<meta property="og:title" content="My product" />
<meta property="og:type" content="product" />
<meta property="og:url" content="http://site.com/product_1/" />
<meta property="og:image" content="http://site.com/image1.jpg" />
<meta property="og:site_name" content="My-Site-Name.com" />
<meta property="fb:admins" content="MYFACEBOOKID" />
<meta property="fb:app_id" content="MYAPPID" />

Thanks!

© Stack Overflow or respective owner

Related posts about facebook

Related posts about opengraph