在FB图API中获取朋友的朋友 [英] Getting friends of friends in FB graph API

查看:123
本文介绍了在FB图API中获取朋友的朋友的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过API调用获得朋友的朋友,当我尝试这样做时,我得到以下异常,

  {
error:{
type:OAuthException,
message:(#604)无法查找所有的朋友....可以只有通过适当的权限
}
}


我尝试访问的URL是



https://图。



我正在获得扩展权限,如下所示,

 < fb:login-button perms =user_likes,friends_likes>< / fb:login-button> 

有任何一个请让我知道这里有什么问题吗?或者这是否意味着我永远不能访问朋友的朋友?

解决方案

目前,没有允许您查看用户的朋友的朋友。 * _likes权限只显示用户喜欢的Facebook页面。



可能您可以迭代地抓取并缓存每个用户的朋友用户的朋友,一个接一个,但没有访问每个朋友的令牌,你只能获取公开的数据。


I would like to get friends of friends via an API call and when I try to do it, I get the following exception,

    {
   "error": {
      "type": "OAuthException",
      "message": "(#604) Can't lookup all friends of .... Can only lookup for the logged in user (...), or friends of the logged in user with the appropriate permission"
   }
}

The URL I am trying to access is,

https://graph.facebook.com/friend_id/friends?access_token=access_token

I am getting extended permissions which is as follows,

<fb:login-button perms="user_likes,friends_likes"></fb:login-button>

Could any one please let me know what's going wrong here? Or does it mean I can never get access to friends of friends?

解决方案

Currently, there is no extended permission that allows you to view a user's friends of friends. The "*_likes" permissions just show you the Facebook pages that the users have Liked.

It might be possible for you to iteratively fetch and cache the friends of each of the user's friends, one by one, but without access tokens for each friend, you'll only be able to fetch public data.

这篇关于在FB图API中获取朋友的朋友的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆