当我使用两个权限登录时:@"publish_actions",@"publish_stream"并想在脸书上发帖。请帮助我解决我已经检查并应用了许多堆栈溢出解决方案,但没有一个有效。我的脸书SDK版本是:3.21
+(void)postFBShare:(NSString *)sArticle
{
NSDictionary *params = @{
@"name" : @"Feed A Puppy",
@"description" : @"Download Feed a puppy on iTunes",
@"link" : @"http://google.com",
@"message" :sArticle,
};
[FBRequestConnection startWithGraphPath:@"me/feed"
parameters:params
HTTPMethod:@"POST"
completionHandler:^(FBRequestConnection *connection,
NSDictionary * result,
NSError *error) {
if (error) {
NSLog(@"Error occurred: %@", [error localizedDescription]);
} else {
NSLog(@">>> FB Shared successfully::%@",result);
UIAlertView* alert = [[UIAlertView alloc]initWithTitle:@"Alert!" message:@"Shared successfully." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
}
}];
}
您可能缺少终结点所需的权限。还要检查您是否有一个打开的FBSession。