graph.facebook.com/username does not work

2019-01-25 09:18发布

问题:

I tried to get user detail using https://graph.facebook.com/username . But it throws an error

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

does anybody have a solution for this problem.

回答1:

graph.facebook.com/{Username} is not avaiable now but lookup-id.com still can find your facebook ID, facebook group ID and facebook page ID



回答2:

The username field was removed with the introduction of the Graph API v2.0.

See

  • https://developers.facebook.com/docs/apps/changelog#v2_0

/me/username is no longer available.



回答3:

"View page source" Option in every web browser will help you. Follow this-

  1. Open the timeline of that person/FB account.
  2. Right-click anywhere on the web-page->View page Source-> wait 1 or 2 seconds to load the new page.
  3. Press Ctrl+f (used to find any string,word in the page) then type " profile_id= " (without quotes).
  4. Copy the long number after " = ", .

Conclusion : Using the "username" doesn't work anymore (Updated till Oct 2018),profile_id is the thing u needed instead.