2

Are there any best practices for offering like buttons within canvas applications? We've got an app which has lots of content, when I specify the OG:URL of some piece of content as a page within apps.facebook.com/myapp, the "like" share shows up as pointing at apps.facebook.com. Is this the best way to do this, or how are other people handling this? Thanks!

The OG tags for my content look roughly something like this:

<meta property="og:title" content="some cool title" />
<meta property="og:image" content="some cool image"/>
<meta property="og:site_name" content="my site name" />
<meta property="fb:admins" content="my id" />
<meta property="og:description" content="Hey neat wow this is content."/>
<meta property="og:url" content="http://apps.facebook.com/myapp/somecontent.aspx">
<meta property="fb:app_id" content="my_appid" />
kevin
  • 417
  • 4
  • 20

1 Answers1

1

Short answer: Common practice seems to be that the og:url property points to the content's address on your server (not the Facebook Canvas iFrame wrapper's URL at apps.facebook.com), and in most cases this URL immediately redirects to apps.facebook.com/your-game.

You can see how many of the top games are doing this by just playing the games enough to earn an achievement or fire off an OG action, then viewing your Activity Log for some such story, right-clicking a link to an object (like an achievement), and pasting it into Facebook's Object Debugger. Here are some URLs of objects from some top games:

For reference, the Facebook Object Debugger is here: http://developers.facebook.com/tools/debug

According to user Igy:

There's no limitation on pointing to the apps.facebook.com url instead - the request is rewritten to silently be a request to your app's callback URL, plus the same path supplied to the apps.facebook.com URL - one reason not to do this is that this behaviour leaves some of your app's functionality out of your direct control, ... for example if a bug goes live on FB which causes all such URLs failed to parse correctly (which has happened recently).

Vin St. John
  • 472
  • 2
  • 9
  • 2
    There's no limitation on pointing to the apps.facebook.com url - the request is rewritten to silently be a request to your app's callback URL, plus the same path supplied to the apps.facebook.com URL - one reason not to do this is that this behaviour leaves some of your app's functionality out of your direct control, e.g. ~2 weeks ago when all such URLs failed to parse correctly until a fix was pushed – Igy Nov 06 '12 at 21:32
  • thank you both very much, and again to igy. I will award the bounty to you @vin st. john as soon as the time ends on the bounty. – ShawnDaGeek Nov 07 '12 at 08:07