Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在python中使用facebook graph api获得facebook好友的喜爱_Python_Django_Facebook_Facebook Graph Api_Sdk - Fatal编程技术网

如何在python中使用facebook graph api获得facebook好友的喜爱

如何在python中使用facebook graph api获得facebook好友的喜爱,python,django,facebook,facebook-graph-api,sdk,Python,Django,Facebook,Facebook Graph Api,Sdk,对于一个web应用程序,我需要得到其他朋友的喜欢,但不知道如何获得。我已经有以下代码,其中token是我的访问代码: token = 'CAAHE.......' graph = facebook.GraphAPI(token) profile = graph.get_object("me") print(profile) friends = graph.get_connections("me", "friends") friend_list = [friend['name'] for frie

对于一个web应用程序,我需要得到其他朋友的喜欢,但不知道如何获得。我已经有以下代码,其中token是我的访问代码:

token = 'CAAHE.......'
graph = facebook.GraphAPI(token)
profile = graph.get_object("me")
print(profile)
friends = graph.get_connections("me", "friends")
friend_list = [friend['name'] for friend in friends['data']]

这给了我一张朋友的名单。有没有办法得到每个朋友的喜欢?另外,是否有一种方法可以在网站的javascript中生成用户的访问代码?谢谢

你找不到像你这样的朋友。不推荐使用好友权限-但不确定是否有可能获得好友喜欢的权限。这将是一个相当大的隐私问题

你只能得到授权你的应用的朋友,你只能得到一些基本数据,如姓名和应用范围的Facebook ID