Facebook android graph api如何获取好友请求计数?
有人知道如何使用Graph API 2.0+获取好友请求计数吗。Facebook android graph api如何获取好友请求计数?,android,facebook,facebook-graph-api,mobile,Android,Facebook,Facebook Graph Api,Mobile,有人知道如何使用Graph API 2.0+获取好友请求计数吗。 /me/friendrequests路径不再工作: { "error": { "message": "(#12) friend requests is deprecated for versions v2.0 and higher", "type": "OAuthException", "code": 12 } } 我不能在android SDK中选择更低的API级别。这已经不可能了。没有其他API可
/me/friendrequests
路径不再工作:
{
"error": {
"message": "(#12) friend requests is deprecated for versions v2.0 and higher",
"type": "OAuthException",
"code": 12
}
}
我不能在android SDK中选择更低的API级别。这已经不可能了。没有其他API可供使用您可以通过以下方式获得好友计数: -(无效)getFriendList
{
}我需要计算给朋友的请求数,而不是我的朋友数。
FBRequest* friendsRequest = [FBRequest requestWithGraphPath:@"me?fields=friends.fields(first_name,last_name)" parameters:nil HTTPMethod:@"GET"];
[friendsRequest startWithCompletionHandler: ^(FBRequestConnection *connection,
NSDictionary* result,
NSError *error) {
NSDictionary* friendsDic = [result objectForKey:@"friends"];
NSArray *friends = [friendsDic objectForKey:@"data"];
for (NSDictionary *friend in friends) {
NSLog(@"firstname %@",friend[@"first_name"]);
NSLog(@"last name %@",friend[@"last_name"]);
}
}];