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];
精彩评论