How to get user id by user profile url?

Now, when the user enters his personal url profile in the text box, for example http://www.facebook.com/Google . The Google logo is immediately displayed on the form (this is the Facebook facebook paeg logo).

If I know the page id, I can show the Google logo this way:

http://graph.facebook.com/[USER_ID.BIZ/image

But how to find out user id with any api?

+4
source share
1 answer

You can get the user ID by analyzing the URL and then going to https://graph.facebook.com/Google and analyzing the json response. You can also parse the URL to get a profile photo: https://graph.facebook.com/Google/picture

0
source

All Articles