Amit
Amit

Reputation: 712

api to get uid from profile URL on facebook

Is there a way (using API) to get users uid from the profile URL in facebook?

Upvotes: 6

Views: 28140

Answers (4)

Risky Pathak
Risky Pathak

Reputation: 616

As of today(28th July 2015), I found a different way to find Facebook user's numeric id from profile url (or username).

As you all will be knowing the profile url syntax is https://www.facebook.com/[username]

So just browse to profile url, right click to view source and search for string "uid":. You will get numeric id next to it.

Upvotes: -2

Francis Pelland
Francis Pelland

Reputation: 784

You can call the graph directly as such: https://graph.facebook.com/username where username is the username you want to lookup.

Upvotes: 5

Ryan White
Ryan White

Reputation: 1917

The REST api has been deprecated.

The proper way to do this is to pass the profile name to the graph api

see: Facebook ID from URL

Upvotes: 5

Christopher Richa
Christopher Richa

Reputation: 1295

Use Users.getInfo, which returns an array of user info, such as first_name, last_name, and uid. Use this call to get user data that you intend to display to other users (of your application, for example). If you need some basic information about a user for analytics purposes, call users.getStandardInfo instead.

Upvotes: -2

Related Questions