开发者

Upload Photos Facebook api EVERYONE

I'm working with fql and php sdk and I created a Facebook page and I want to allow all users who likes my pages to upload photos (created dynamic from different photos like a collage), my problem is that as administrator of the page I can upload pictures but as a normal user does not allow me:

There is some kind of rule that does not allow me to upload photos

public static function AddPhotoToAlbum ($ userId, $ message)
{
$albumID = '166X93X634658X2 ';

$facebook-> setFileUploadSupport (true);

                $ file = "@". realpath ('img / image'. $ userId.. 'png');

$args = array (
'message' => $ message,
'access_token' => $ accessToken,
'image' => $ file);

$data = $ facebook-> api ('/'.$ album. '/ photos',开发者_如何学Python 'post', $ args);

print_r ($ data);

}

Any idea how to solve this problem. regards


When uploading with graph API make sure you use album's object_id and not aid (album id) - they are different. Strange it works for you though in some scenarios as you say. Also it would be helpful if you copy-paste the error message you get from facebook API here.

hope this helps

EDIT: user has to be administrator of the page to be able to upload.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜