Вопрос

I can use facepy to get my likes, and a list of my friends, but I haven't figured out how to get it to return a list of my friends' likes, sorted by friend, as for example, this returns using the graph explorer: https://developers.facebook.com/tools/explorer/?method=GET&path=1310493851%3Ffields%3Dfriends.fields%28likes%29

Here's what I have that gets my likes and lists of friends:

import json
from facepy import GraphAPI

graph = GraphAPI('access token')
my_likes = graph.get('me/likes')
friends = graph.get('me/friends/')

What call do I make to graph.get to get the lists of likes by my friends?

Это было полезно?

Решение

Just place the path in and it should work

friend_likes = graph.get('me?fields=friends.fields(likes)')
friend_likes['friends']
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top