开发者

Upload Photos Facebook api EVERYONE

开发者 https://www.devze.com 2023-04-07 04:49 出处:网络
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

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

精彩评论

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

关注公众号