我在请求共同朋友时遇到错误:
NSDictionary *params = @{
@"fields": @"context.fields(mutual_friends)",
};
/* make the API call */
[FBRequestConnection startWithGraphPath:[NSString stringWithFormat: @"/%@", friendId]
parameters:params
HTTPMethod:@"GET"
completionHandler:^(
FBRequestConnection *connection,
id result,
NSError *error
) {
/* handle the result */
if (!error) {
NSLog(@"MUTUALS = %@",result);
} else {
NSLog(@"MUTUAL ERROR %@",error);
}
}];
MUTUAL ERROR错误域= com.facebook.sdk代码= 5"操作无法完成。 (com.facebook.sdk错误5。)" UserInfo = 0x788b68f0 {com.facebook.sdk:ParsedJSONResponseKey = { body = { error = { 代码= 100; message ="不支持的获取请求。请阅读https://developers.facebook.com/docs/graph-api&#34 ;;上的Graph API文档。 type = GraphMethodException; }; }; 代码= 400; },com.facebook.sdk:HTTPStatusCode = 400}
friendId 肯定是正确的。我做错了什么?
答案 0 :(得分:0)
问题解决了:“friendId”用户没有授予相应的权限