I have 16,000 URLs. each is a Facebook open graph object. I need to get the open graph data for each of the 16k URLs.
The way I'm thinking about doing this is first finding the open graph object ID of each URL, and then in a nightly cron job, I would do a graph.facebook.com batch request for the details of each object.
However the first step I am unsure of how to do. How do I get all the Object IDs of 16,000 URLs? (all at once). perhaps FQL?
please help!
If your URL looks like this:
http://www.facebook.com/WHATEVER
just do this:
https://graph.facebook.com/?ids=WHATEVER
... the object ID as well as a bunch of other info will be returned as the result. You can also request multiple objects as in:
https://graph.facebook.com/?ids=WHATEVER1,WHATEVER2,WHATEVER3
(test this out here: http://developers.facebook.com/tools/explorer/)
$batched_request='[{"method":"POST","relative_url":"method/fql.query?query=select id, url from object_url where url in ('.$urls.')"}]';
$urls should be around 300 urls. and then repeat
i dont think it be possible to get 16K url's information in a one action
you can set cron job for this & try to get information about 10 url every time