Facebook Graph API
Terry Reedy
tjreedy at udel.edu
Tue Feb 19 10:33:43 EST 2013
On 2/19/2013 7:37 AM, takeshi honda wrote:
> The following code gave me the error, "facebook.GraphAPIError: Unsupported operation". How can I fix this error?
>
> import facebook
> import sys;
>
> token = 'mytokenxxxxxxxxx';
>
> graph = facebook.GraphAPI(token)
> profile = graph.get_object("myusername")
> friends = graph.get_connections("myusername", "friends") # error occured at this line.
Look in the reference for GraphAPI (Facebook account login required) to
find out what you should have written instead of 'get_connections'.
> friend_list = [friend['name'] for friend in friends['data']]
> print friend_list
>
--
Terry Jan Reedy
More information about the Python-list
mailing list