1

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?

ViennaMike
  • 2,207
  • 1
  • 24
  • 38

1 Answers1

4

Just place the path in and it should work

friend_likes = graph.get('me?fields=friends.fields(likes)')
friend_likes['friends']
phwd
  • 19,975
  • 5
  • 50
  • 78
  • Thanks! I didn't have a good example with "fields=", and had also seen the friend_likes parameter, wasn't sure what the syntax should be. This works. – ViennaMike Jun 25 '13 at 12:46