开发者

Some of the aliases you requested do not exist: facebook graph api, photo to album

I am using facebook graph api to upload photos to existing album in my account. Here is my code how i am doing.

$fb = new Facebook(array(
                    'appId'  => 'xxxxxxxxx',
                    'secret' => 'xxxxxxxxx',
                    'cookie' => 'true'
    ));

$fb->setFileUploadSupport(true);
$imagePath='C:\\wamp\\www\\photo\\photo.jpg';


    $args = array('message' => 'photo caption is...');
    $args['image'] = $imagePath;
    $data = $fb->api('/'. '5463871911515666183' . '/photos?access_token='. $user_access_token, 'POST', $args);

    print_r($data); 

when i execute this it show开发者_StackOverflow社区s an error

Fatal error: Uncaught OAuthException: (#803) Some of the aliases you requested do not exist: 5463871911515666183 thrown in C:\wamp\www\photo\facebook-php-sdk\src\base_facebook.php on line 970


The Problem has been solved , i was fetching album IDs using FQL, in which id of an album is represented as 'aid', While in the GRAPH API album id is represented as 'id' while uploading image to an album i am using Graph API, the same object in the FQL and Graph is represented in different. In the FQL , object_id is equavlent to the Graph API id.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜