Getting problem to wall post on Facebook
When I login to Facebook through my app, everything works, but I'm having problems posting to walls.
- (NSString *) postToFBWallStatus:(NSString *) status andSetDelegate: (id) delegate
{
if (! isFBLoggedIn)
{
return @"NotLoggedin";
}
NSString *message = status;
NSLog(@"Appdelegate: postToFBWallStatus:andSetDelegate:");
NSLog(@"to be delegate class: %@",[delegate class]);
NSURL *url = [NSURL URLWithString:@"https://graph.facebook.com/me/feed"];
ASIFormDataRequest *newRequest = [ASIFormDataRequest requestWithURL:url];
[newRequest setPostValue:message forKey:@"message"];
[newRequest se开发者_运维知识库tPostValue:@"" forKey:@"name"];
[newRequest setPostValue:@"" forKey:@"caption"];
[newRequest setPostValue:@"" forKey:@"description"];
[newRequest setPostValue:@"" forKey:@"link"];
[newRequest setPostValue:@"" forKey:@"picture"];
[newRequest setPostValue:_accessToken forKey:@"access_token"];
[newRequest setDidFinishSelector:@selector(postToWallFinished:)];
[newRequest setDidFailSelector:@selector(postToWallFailed:)];
[newRequest setDelegate:delegate];
[newRequest startAsynchronous];
return @"Loggedin";
}
I get this message when I post to the Facebook wall:
error = {
message = "Invalid access token signature.";
type = OAuthException;
};
You must use the user's access_token
to post information to their wall. Furthermore, the user needs to allow the publish_stream
permission for the API call to work. When you authenticate the user, add publish_stream
to the scope of permissions.
精彩评论