Get users Facebook ID for database - facebook

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.

Related

Get Instagram profile page from an id

I have been using Factual Places & Crosswalk API to get Social Media links on some specific places on my iOS app. The API returns proper links for Facebook & Twitter. But for Instagram it just return an id, something like this 79471948.
I was wondering how I can make use of this id. I thought I could use it in a URL, something like this. http://instagram.com/79471948, But this does not exists.
Then I thought the id could be a user-id. If it is a user-id I wanna get the username of the corresponding user-id so that I open his profile page something like this http://instagram.com/79471948. But as we know that Instagram does not allow us to directly request for User Data without OAuth we can't get access token. Without getting access token, I cant get the username.
So do you guys have any suggestions? So the whole thing is, I have this id 79471948 and I wanna open up the corresponding profile without doing any OAuth.
Thanks in Advance.
You have to use API to get the user profile from user-id.
https://api.instagram.com/v1/users/{user-id}/media/recent/?access_token=ACCESS-TOKEN
https://www.picodash.com/# allows you to search for a user-id and view the full profile or open actual instagram.com/username link and view.

Information about Facebook logins and unique pages

I need to learn how to implement login into a website but I've heard that I shouldn't make a custom script unless I really know what I'm doing.
A better alternative I've hard is to just use Facebook login. I've looked over the docs but I'm still confused on something. I want to store additional information about the user (not just their facebook profile information) and I need to use that information to generate unique pages when they're logged in.
I am also wondering if the additional information I save about them will be just as secure as their facebook information or if it will be more vunerable.
If someone could guide me in the right direction with direct answers or useful articles I would very much appreciate it.
Read through the docs for login with Facebook and try out the sample code provided. That will give you a clear idea how to integrate Facebook login in your website.
In order to integrate login with Facebook you will first require an app id which is quite simple to create. Once you have the FB app id, you can integrate the login bit. Once the user successfully logs in, you should get back an app-scoped user id and as suggested by Lix use that as the primary key. Also, after user logs in, you can may be present a form where you collect additional data and save that against the user id in the database.
Regarding the security of the information, it really depends how and where you store it.

Interact with Facebook data

I would like to know if there is a way to extract some informations from facebook users and pages without creating a facebook app.
In other words, I would like to know if it is possible to do on facebook what can be done on Twitter using their streaming API (facebook is more suitable for my purposes), or if is there a dataset that I can query without having to interact with every single user to get his/her permission (without using access tokens).
To be more specific, I need to know two kind of infos from users: the place where they live and their likes on page and nothing more, users can be anonymous or with a fake ID or whatever.
Thank you!
For privacy reasons, it is not possible at all. You must authorize a user with the correct permissions to get that kind of data.
Also, you would not be allowed to use the data in any way without asking the user for permission, and scraping is not allowed on Facebook. Even if it would be possible without the Graph API, it would not be allowed.

Is there API to get someone's facebook profile with out login to facebook?

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

using the facebook graph to display profile pictures ...what if someone changes their username?

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.