照片没有上传到Facebook相册使用图表api

问题描述:

$ p

Photo not uploaded in facebook album after giving enough file upload permission.... i have also refered related question for graph api still there is no success...

 $facebook->getLoginUrl(array('scope' => 'user_status,publish_stream,user_photos,photo_upload,can_upload'));

                        $album_details = array(
                                'message'=> 'Testing Description For Pic',
                                'name'=> 'Testing Pic Album'
                        );

                        $create_album = $facebook->api('/me/albums', 'post', $album_details);






                        $args = array(
                                'message' => 'Photo from application',
                                'image' => '@'.$imgURL
                        );



                        $url = 'http://graph.facebook.com/'.$create_album['id'].'/photos?access_token='.$aut_key;
                        $ch = curl_init();
                        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);


我遇到同样的问题,

请尝试确保$ imgURL是服务器上的相对图像位置,而不是图像的通用网址。

Please try to make sure that $imgURL is the relative image location on your server and not a generic web url of the image.

另外,尝试在这里交叉检查 http://developers.facebook.com/blog/post/ 498 /

Also, try to crosscheck here http://developers.facebook.com/blog/post/498/