Search code examples
facebook-javascript-sdkfeedfacebook-social-pluginsfacebook-comments

Published story and the Comments plugin


I'm hoping someone has some experience using the comments social plugin, specifically with regards to formatting the story Facebook publishes when a user leaves a comment.

I had expected the process would be exactly the same as the Like plugin, whereby I make sure the URL I'm using in the comments plugin points to a page that contains a bunch of OG meta tags, all correctly supplied and defined. Yet despite having set this up (and working fine with Like buttons), and having ran the target URL through the Linter tool and seeing everything appear as I expect (no warnings or errors either), whenever I have a test user leave a comment and publish the story to their wall all I see is the comment they left and the full URL link displayed underneath.

It's pretty ugly on the one hand, and confusing on the other. All the meta data is present AFAIK and as I say, it works perfectly fine with the Like button; I get a nice image, title/description text etc.

Here's the meta data I'm using (note: the URL and IMAGE meta tags are dynamically written in depending upon some querystring parameters in the comments plugin url I'm using. I've also replaced potentially sensitive values for dummy values):

<meta property="fb:app_id" content="MY-APP-ID">
<meta property="og:type" content="article">
<meta property="og:url" content="https://apps.facebook.com/MY-APP/?key1=val1&amp;key2=val2&amp;key3=val3&amp;key4=val4">
<meta property="og:site_name" content="My Site">
<meta property="og:image" content="http://domain.com/myimage.jpg">
<meta property="og:title" content="My title">
<meta property="og:description" content="Some description here">
<meta property="article:published_time" content="1341126000">
<meta property="article:expiration_time" content="1356940800">
<meta property="article:author" content="http://www.mywebsite.com/">
<meta property="article:section" content="My Section">
<meta property="article:tag" content="My Tag">

Is it that comments only create basic stories in the user's feed (seems unlikely). Do I have to use "blog" or "website" as the "og:type" (seems unlikely too)?

Would appreciate any help!

Cheers

Lee


Solution

  • It turns out the problem was caused by the Page being set to unpublished, and the test app set to sandbox mode. I've no idea why the Comments social plugin has this problem when Like button social plugin doesn't, but hopefully this might help someone else with the same issue.