3
votes

My site is using the Facebook comments box plugin. I can access the comments using the graph api for my iOS app by calling:

https://graph.facebook.com/comments?ids={url}

However, if the url referenced above isn't visited at least once in a browser I'll get the error:

{
  error: {
    type: "Exception",
    message: "Unknown identifier, ",
  }
}

It makes sense that the url hasn't been registered yet via the plugin. However, I might be accessing these urls in my iOS app before anyone visits them on the web. Does anyone know of a graph api call that will register the url with Facebook? If my situation were read only I would simply say there are no comments but I have the same problem when trying to post a comment.

1
you still got no answer? I'm having the same issues, id thank you very much if you could share your knowledge. Oh, btw, Theres facebook.stackoverflow.com, the now official place to ask facebook questions. - fceruti

1 Answers

1
votes

You can programmatically scrape a particular page containing a social plugin by making a CURL (or similar) call to:

http://developers.facebook.com/tools/debug?url={YOUR_URL}&format=json

This is mentioned in the OG docs at http://developers.facebook.com/docs/opengraph/#edit although links to the older URL for the OG Linter.

I believe linting/scraping a page such as this should register any social plugins on the page without requiring you to visit the page first.

Edit: See also the Updating Objects section at the bottom of this doc: https://developers.facebook.com/docs/opengraph/objects/