我正在尝试找到用户,但这会引发身份验证错误
import requests
from urllib.parse import urlencode
token = 'my-token'
graph_url = 'https://graph.facebook.com/v3.2/search?'
params = {
'q':'francisco',
'type':'user',
'method':'get',
'format':'json',
'access_token':token
}
url = graph_url+urlencode(params)
resp = requests.get(url)
print(resp.json())
错误:
{'error': {'message': 'Unsupported operation', 'type': 'OAuthException', 'code': 100, 'fbtrace_id': 'Dao1UbelGkF'}}
似乎我做得不好或不再允许搜索
答案 0 :(得分:1)
https://developers.facebook.com/docs/graph-api/changelog/breaking-changes#search-4-4
自2018年以来,搜索用户不再可用。无论如何,这毫无意义,您只能获得授权您的App的用户。