开发者

how to publish photo on application profile page using REST api of facebook

开发者 https://www.devze.com 2023-02-15 16:37 出处:网络
i am uploading photo to application(or like) profile page. But it will show error message \"error_code\":240,\"error_msg\":\"Requires a valid user is specified (either via the session or via the API

i am uploading photo to application(or like) profile page. But it will show error message

"error_code":240,"error_msg":"Requires a valid user is specified (either via the session or via the API parameter for spe开发者_运维问答cifying the user."

i am using REST API for facebook.

And this code NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys: img, @"picture", kAppId,@"uid", nil];

[_facebook requestWithMethodName:@"photos.upload"
                       andParams:params
                   andHttpMethod:@"POST"
                     andDelegate:self];

where kAppId is applicatino ID. if i remove @"Uid" parameter then photo uploaded to my(user) photo album.

this thing is possible in web that user can upload a photo to like page as news feed. how we can do it through REST APi

Thanks


You may want to try urlencoding your params using

[params dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
0

精彩评论

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