当我使用两个权限进行记录时:@“publish_actions”,@“publish_stream” 并希望在Facebook上发布。请帮我解决我已经检查并应用了很多stackoverflow解决方案,但没有一个工作。我的facebook 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];
}
}];
}
答案 0 :(得分:0)
您可能缺少端点所需的权限。还要检查你是否有一个开放的FBSession。