我正在使用 facebook_skd_3.1 (Xcode ios 4.5) 我通过调用 FBFriendPickerViewController 获得了朋友列表,在单击完成按钮时我试图
在选定的朋友墙上发布消息但我收到了这个错误:- 警告:尝试从视图控制器中关闭在演示或解散过程中!
2012-12-06 19:37:09.187 ........项目 [5474:19a03] 错误:HTTP 状态代码:403
警报视图中的错误
error =Error Domain=com.facebook.sdk code=5" ..........
message = "(#200)the user hasn't authorized the application to perform this action";
type = OAuthException
};
};
code=403;
com.acebook.sdk:HTTPStatuscode=403}
代码 :-
-(void)facebookViewControllerDoneWasPressed:(id)sender {
NSString* userid;
for (id<FBGraphUser> user in self.friendPickerController.selection)
{
NSLog(@"\nuser=%@\n", user);
userid = user.id;
}
NSMutableDictionary* dictaram = [[NSMutableDictionary alloc]
initWithObjectsAndKeys:@"like this!", @"message", nil];
[FBRequestConnection startWithGraphPath:[NSString stringWithFormat:@"%@/feed", userid]
parameters:params HTTPMethod:@"POST"
completionHandler:^(FBRequestConnection *connection, id result, NSError *error)
{
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Shared"
message:[NSString stringWithFormat:@ %@! error=%@", fbUserName, error]
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alertView show];
}
];
[self dismissModalViewControllerAnimated:YES];
我需要一些权限还是有一些编码错误请帮忙。
提前致谢。