I am starting to create a small application to get the names associated with Facebook IDs for a larger project. I just started using the Facebook API and it gave me weird results. In most cases, everything works fine. I am using this code (I am using Python, but it really doesn't matter, since it is the Facebook API that causes this problem):
def downloadString(url, params): cookie = {} data = requests.get(url,cookies=cookie,params=params) return data.text url = "https://graph.facebook.com/v2.6/" id = "afriendidhere" dl = basics.downloadString(url + id, {"access_token":accesstoken}) res = json.loads(dl)
As I said, most of the time it works fine, giving me the name of a given person. Although, for two people on my friends list, I get the following message:
{ "error": { "message": "Unsupported get request. Object with ID 'theid' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api", "type": "GraphMethodException", "code": 100, "fbtrace_id": "FTfrh78XjW/" } }
I do not understand why. A person with this identifier exists, since I can access the page http://facebook.com/messages/theid , and this gives me a history of conversations with this user. They are always the same people who cause the error, all the others work fine.
Does anyone know why?
facebook facebook-graph-api
Thomas kowalski
source share