E
E
Eva052016-09-05 13:35:14
Python
Eva05, 2016-09-05 13:35:14

Facebook API (#803) Cannot query users by their username. What's wrong?

Good day everyone!
Installed Facebook API in Python
https://github.com/mobolic/facebook-sdk/blob/maste...
import facebook Everything works.
Example works too
access_token = ''
# Look at Bill Gates's profile for this example by using his Facebook id.
user = 'BillGates'
graph = facebook.GraphAPI(access_token)
profile = graph.get_object(user) posts
= graph.get_connections(profile['id'], 'posts')
error
For example user='profdanielamatos '
GraphAPIError: (#803) Cannot query users by their username (profdanielamatos)
Help me figure out what's wrong?
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2016-09-05
@Eva05

Facebook has disabled the ability to contact by username.
And "BillGates" is not the username of the user, but the short address of the public page.
That is, username only works with pages. "cnn" will work, "vasyapetrov" will no longer work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question