2
我有以下代码:如何在iPhone上使用图形API发表评论照片?
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:txtComment.text, @"message", nil];
NSString *strPicId = [[Appdel.arrFacebookImages objectAtIndex:Appdel.getIndex] valueForKey:@"id"];
NSString *strPath =[NSString stringWithFormat:@"%@/comments",strPicId];
[FBRequestConnection startWithGraphPath:strPath parameters:params HTTPMethod:@"POST" completionHandler:^(FBRequestConnection *connection, id result1, NSError *error)
{
if(!error)
{
}
else
{
NSLog(@"ERROR:%@",error);
}
}];
但它运行时,它给我的错误,如下面,
ERROR:Error Domain=com.facebook.sdk Code=5 "The operation couldn’t be completed. (com.facebook.sdk error 5.)" UserInfo=0xb36dd80 {com.facebook.sdk:HTTPStatusCode=403, com.facebook.sdk:ParsedJSONResponseKey={
body = {
error = {
code = 200;
message = "(#200) Requires extended permission: publish_stream";
type = OAuthException;
};
};
我已经成功登录,我也越来越相册,照片,评论,但我不能发表任何评论任何照片。