0

A few weeks ago this query generated a "JSON", with the public fields of a user, without need a access token:

https://graph.facebook.com/zuck or https://graph.facebook.com/4

Previously this generates a result like:

{
    "id": "4",
    "name": "Mark Zuckerberg",
    "first_name": "Mark",
    "last_name": "Zuckerberg",
    "link": "http://www.facebook.com/zuck",
    "username": "zuck",
    "gender": "male",
}

But now it is not possible. In all queries with any usernames generates this result:

{
   "error": {
      "message": "(#803) Cannot query users by their username (zuck)",
      "type": "OAuthException",
      "code": 803
   }
}

My question is:

Facebook made some changes to the API ?. What I can do instead?.

Excuse my English. Thanks in advance.

1 Answers1

2

Yes, that change was announced more than one year ago, with v2.0: https://developers.facebook.com/docs/apps/changelog

/me/username is no longer available.

The only proper way to get access to user data is by authorizing the user and using /me, you can´t use the username anymore.

andyrandy
  • 72,880
  • 8
  • 113
  • 130