Follow this Blog!

Aug 19, 2015

f Comment

How to get Facebook user profile URL given a numeric ID in SECONDS?

Amazon If you use Facebook Graph API to crawl Facebook users, the JSON data you get looks something like this:
"from": {
  "name": "Michael",
  "id": "100000123456"
The key "id" points to the FB user's identifier. Given this identifier you can construct a URL that points to the user's Facebook main profile. However, one day you realize this issue: there are two IDs for the same person! How is that possible? How do you get the Facebook user's profile URL given either ID?

[Update per 2015/12/18] It looks like if the FB user has no user name, then you can use either<id> or<id>/. If the FB user has user name, then you use<id>/ (e.g.

Getting Facebook user URL by ID is easy. Read on to see how.


The cause of having more than one ID for the same FB user is due to their software upgrade. Facebook has introduced the concept of "app scoped user ID". You can find more information at FB's official documentation page.


The solution is easy. Simply try the following URLs (replace <id> with the actual ID):<ID><ID>
For example, if the ID is 100000123456, then here are the URLs to try:
And one of them should redirect you to the Facebook user's profile URL, which looks like this:
Questions? Let me know!
Please leave a comment here!
One Minute Information - by Michael Wen
Find Michael on Google or Facebook
ADVERTISING WITH US - Direct your advertising requests to Michael