How to get facebook user id by user url? - facebook

Looking to get user profile image url by enter user url, but I see that api not allowed get it by user url but with user id.
My question is - how can I get the username ID by giving the user url?
like here - https://lookup-id.com/
Thanks :)

Related

Facebook user ID Issue

I have facebook user ID's
using this id's am accessing profile page of that particular user id.
link will be look like https://www.facebook.com/100001533612613
this link not working now.
https://facebook.com/zuck
https://www.facebook.com/100001533612613 (**not working**)
https://www.facebook.com/profile.php?id=100001533612613 (**not working**)
https://m.facebook.com/ChrisHughes
how can i see profile using UserId
how can i access profile using UserId
You can’t, because you are not supposed to any more …
You will now need to ask for the user_link permission first, and then you can request a (temporary) link to their profile via the link field.
https://developers.facebook.com/docs/graph-api/changelog/version3.0#login

URL for Facebook album id

Is it possible to get URL for Facebook album id (fbid) without any request?
Like I can get URL for photo - https://www.facebook.com/photo.php?fbid=FBID
I need a valid URL for use with Graph API in link field.
http://www.facebook.com/FBID - is not valid, because shown as plain text in link field.
If albumid is 1256641940078, the URL is
http://www.facebook.com/1256641940078
Nodes in the Graph API have a unique ID and you can generally link to anything like this if you just know that ID. For example you can even link to a person like http://www.facebook.com/297200003
Do this:
http://graph.facebook.com/FBID?fields=link
Example: http://graph.facebook.com/537137506325516?fields=link
You better use user access token for private photo.

How to get user's id by user's profile url?

Now when the user input his personal profile url to a textbox, such as http://www.facebook.com/Google.
The form immediately show the Google logo(it's the Google's facebook paeg's logo).
If I know the page id,I can show the Google logo in this way:
http://graph.facebook.com/[USER_ID]/picture
But how to know the user id with any api?
You can get the user id by parsing the url and then going to https://graph.facebook.com/Google and parsing the json response. You can also parse the url to get the profile photo: https://graph.facebook.com/Google/picture

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?
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
You can call the graph directly as such:
https://graph.facebook.com/username where username is the username you want to lookup.
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.
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.

FBConnect on iPhone. question about the profile image

Im developoing an app for the iPhone where users can chat using their facebook account info.
in this case: the facebook username & profile image. my question is How can I share the users profile picture in the chat box so that people can see each others avatars?
the pictures must be online somewhere? how to get to that url?
I should do somthing like this when the send button is tapped:
get the username, get the msg, get the the avatar url.
send the info to the chat server.
alt text http://img98.imageshack.us/img98/5103/screenshotrci.png
first get the album name by using FBconnect.photos.getAlbum and pass UID. it will return an array with all album info .then find the album name " profile pictures" and their album id.
after that use this album id to get the profile photo .
using this api FBConnect.photos.get and pass album id as params
this might be a little late, but all you need to do is put "pic_square" (a 50x50 image) into the fql query that you use for getting the name
NSString* fql = [NSString stringWithFormat:#"select uid, name, pic_square from user where uid == %lld", self.usersession.uid];
and that's it, it'll return a string with the URL of the image you want.