Facebook Graph API

T

takeshi honda

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.

friend_list = [friend['name'] for friend in friends['data']]
print friend_list
 
T

Terry Reedy

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
 
Ó

óÁÈÎÏ× íÉÈÁÉÌ

You need to get token from API server before signing requests with it,
don't you?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top