How do i retrieve the url of an image uploaded via Facebook's graph api
I've successfully uploaded an image to user's album using the following code:
$ch = curl_init();
$url = 'https://graph.facebook.com/'.$uid.'/photos?access_token='.$token;
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HE开发者_如何转开发ADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $args);
$data = curl_exec($ch);
can anyone tell me how I would then retrieve the public link to that image?
I have more experience FQL however, it looks like this might work:
https://graph.facebook.com/me/picture
Documentation is under "connections"
http://developers.facebook.com/docs/reference/api/user
If you choose to use FQL:
http://developers.facebook.com/docs/reference/fql/
http://developers.facebook.com/docs/reference/fql/profile
Succesful photo upload returns id for the uploaded picture. Use that id to request extended info about the picture (graph.facebook.com/[photoid]?access_token=...)
精彩评论