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
Related
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 :)
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.
Is it possible to post on a page with a url scheme?
I currently have this, fb://profile/325899700848032
But this only opens the page ofcourse. What i mean is something like this
fb://profile/325899700848032/PostMessage/"test message" or ../PostImage/image
Is anything like this possible to do?
Thanks!
To post on facebook page you need to ask first for the famous manage_pages authorization. Once you have it you make a FBRequest on the openGraph for me/accounts which return an array of the current user pages and other application. You parse this json for each page and you pick the token_access and the id. You then set the page token access on your facebook manager and then you can post for example a picture to the page with the "{id}/photos" POST graph request {id} being the page id.
Im trying to link my facebook profile to my website , but when I put the url into the like box it gives me a message "Could not retrieve ID for the specified page. Please verify correct href was passed in."How can I fix this ?
The Like Box does not work with personal profile page. You need to create a fan page or an app.
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.