Skip to content

Instantly share code, notes, and snippets.

@kylewm
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylewm/91f9510d8a0c49722e08 to your computer and use it in GitHub Desktop.
Save kylewm/91f9510d8a0c49722e08 to your computer and use it in GitHub Desktop.
bridgy stackoverflow question

Facebook Graph API: Find graph object from post URL

Given the URL of a public Facebook post, how can one find the post object in the FB Graph API?

We would like to be able to comment on or like a post via the v2.x Graph API, given the post's URL. Doing so requires the post's object ID, which we can make some educated guesses about, but accessing the actual object through the API has proven unreliable (works for some posts but not others).

v2 of the API introduced app-scoped user IDs, and post IDs generally seem to be of the form {app-scoped user id}_{unique post id}. Here are the details of some attempts to find posts in the API with various combinations of these IDs (global user id, app-scoped user id, and post id).

For reference, here is the GitHub issue where we have been tracking this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment