views:

17

answers:

2

hey guys, 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_HEADER, 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? Thanks in advance.

A: 

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

grmartin
A: 

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=...)

Denis
Thanks for the reply! This seems as though it would work, but the return value is 'false'. I'm passing it the same access token as I am when publishing the photo in the first place. What gives!?
iamaracinghorse

related questions