I'm trying to retrieve Open Graph data for websites from Facebook.
I found a url that takes a website as a parameter and returns Facebook post information such as number of likes a page has gotten.
I.E https://graph.facebook.com/?ids=http://www.imdb.com/title/tt0117500/
As nice as this is, I need the open graph information in the same JSON format to get the websites OG metatags.
There is this URL
I.E https://developers.facebook.com/tools/debug/og/object?q={URL}&format=json
that is supposed to return JSON but it's currently non functional and there is a bug filed here.
When you parse the URL through the online debugger.
There is a direct link at the bottom of the page that contains the exact information I'm looking for.
https://graph.facebook.com/380728101301
However I have no idea how to programmaticly get the ID (380728101301) for the URL match.
(Note that there are two separate calls for URLS, the first one (with ?ids=
) I can get easily which gives the FB info such as number of likes. I need to get the 2nd one that mentions the OG metatags on the webpage).