我正在尝试对特定的 Facebook 帖子发表评论,但出现以下错误。
请帮我
NSString *myurl=[NSString stringWithFormat:@"https://graph.facebook.com/298723893602606/comments?message=\'This is my message\'&access_token=%@",FBSession.activeSession.accessToken];
NSString *theurl=[myurl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSMutableURLRequest *theRequest=[NSMutableURLRequest requestWithURL:[NSURL URLWithString:theurl]cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0];
[theRequest setHTTPMethod:@"POST"];
NSURLResponse *response;
NSError* error12;
NSData *data=[NSURLConnection sendSynchronousRequest:theRequest returningResponse:&response error:&error12];
NSString *strResponse=[[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"Response String=%@",strResponse);
错误:
Response String={"error":{"message":"(#200) Requires extended permission: publish_stream","type":"OAuthException","code":200}}