On my website, I want to connect users through facebook messenger. I wanted to be able to store a user's id or username so that I can generate a http://m.me/id or usernamefor that specific person.
I know it is no longer possible to get usernames or ids from the facebook api, but is there any other way to create a link for a specific profile? If I want get a link for a facebook profile its possible to use app_scoped_user_id like this
https://www.facebook.com/app_scoped_user_id/id_from_sdk. Is there a similar solution for messenger.com?
Yes you can still get the user's ID if you are using Codeigniter
$userInfos = $this->facebook->getUserInfos();
$user_facebook_id = $userInfos['id'];
I hope I answered your question.
Related
I'm making a game where I can link the user account with Facebook. So far so good, but I need a value that identifies the Facebook user, as the name, but that is unique. So I thought of user name that is unique per account. But I found no information in the Facebook documents that show how to get this information. Does anyone know how I can get this? And it is not the name that the user puts in his profile, it is the username.
The best way to do this (and the best way to store) is by the use of User IDs. Facebook allows you to do this.
User: https://developers.facebook.com/docs/graph-api/reference/user/
I personally don't use Facebook API but from experience you would use an User ID.
I would like to retrieve a Facebook user's id given their username.
Example: Given helloworld return 100003263065603.
I understand that the Graph API does not allow this anymore, but several sites, such as lookup-id and findmyfbid are able to do this.
I am guessing they are doing some sort of scraping? If so, how would I implement this in Node.js
Those sites most likely scrape the profile page, which is not allowed. Don´t do that, should not need to anyway. Just let the user authorize your App and you will get his (App Scoped) ID. There´s no serious application for using the username or his global ID anymore.
I was wondering if its possible to get one's facebook profile (to be exact,'profile url') through their API?
I need an api to get fb profile link using a matching email address. I dont want to login to facebook though.I was trying to search for this but it seems you need to log in to facebook to get that.
Any idea or is it feasible?
You need ID of the concerned user which can't be achieved without using the Facebook Login, since Facebook login is the starting point to get the current user info (/me).
Search API could have helped you since you have the email ids of users, but unfortunately this api doesn't support user search with email!
So, answer is simple- NO, you cannot get the ID (profile link) of the user without using the facebook login.
Not that I can think of. Facebook's Graph API gives you some public info but that info given depends on the users Facebook's settings on what is public or not. You could maybe get some users profile picture but not others, making it not a very viable option for practical use. Hope that helps
I am building a web app that will retrieve basic Facebook user information, among them also the profile photo, via
https://graph.facebook.com/USERNAME/picture?width=100&height=100
I plan on storing that variable in my database so that I can display the profile photos in the web app.
Now, I'm wondering what happens when someone changes their Facebook username from "jimmysmith" to "jamesdoe", for example? I assume that my saved URL of
https://graph.facebook.com/JIMMYSMITH/picture?width=100&height=100
will stop working? Is there any way around this?
Or will it still work because Facebook redirects the old username to the new username, maybe? I found no evidence of that, however. I have no way of testing it, either.
The way I retrieve it via FQL is:
$fql = "select uid, name, email, birthday from user wher.... etc.
Use the user IDs instead.
Usernames will not be query-able in v2.0 API.
See https://developers.facebook.com/docs/apps/upgrading for more information.
I need the following, any help would be much appreciated.
I Have a registration form.
It inputs the data Name | ID | DOB | TWITTER | FBID
When the user registers it asks for the above values.
Twitter is easy as users can just put in their Twitter ID.
But I Need to get the users Facebook ID in the form.
What would be the best way to do this?
Could i use the 'Connect To Facebook" Feature.
All i need is the Facebook user ID so that i can use it when retiring graph data later on.
I have set up a Facebook Application and am using PHP with a MySQL database.
Thanks
Alex
Well, they have specific APIs for different functions. In your case none of their simple solutions work. You will probably need to use Facebook's Graph API. You should take a look in their PHP SDK. It is a very useful tool. I used it once and it worked perfectly.
You will need to know much, before you get the users is. Also if you want to make that automatically, they will have to be logged in and they will have to confirm access to their personal data from your facebook app.
Good luck!
For any user data you wll need to get permission from user.
You can use Facebook connect.
Make the user log in and get access token, this access token is the key to all user data.
You can use this access token with graph API also.
Check my blog.