Im starting to implement the Facebook apis into my website..
Where i am having trouble is understanding the oauth api. Maybe this inst the correct api?
Basically what i am trying to do is allow the user to sign in / register with Facebook and and storing that information in my database as a new user as i will be creating a profile from this. I would also like the user to be able to login with or without Facebook using his credentials. I understand he would have to create a password on my site. Is it practical to store his information .. Name Address email and other information.
I am very confused with the api and need help. reading through the documentation i cannot find where this explained.
Look at how to authenticate user using facebook login system on your website
About your question on storing emails, check facebook policies are mentioned here
Use graph api for accessing user details and other stuff
Hope this helps
Related
While reading instagram basic display api documentation I get the sense that we cannot use this api for authentication. As they write under the limitation as:
Authentication — Instagram Basic Display is not an authentication
solution. Data returned by the API cannot be used to authenticate your
app users or log them into your app. If you need an authentication
solution we recommend using Facebook Login instead.
But looking at their API reference I get they provide oauth tokens and authentication flow /scopes.
Their getting started guide also list down steps to setup app. Anyone please explain what I am missing there ? I am looking for social login solution using instagram, thanks.
I'm developing a mobile API and I would like to allow mobile users to log in to my mobile application using their Facebook account.
I've been struggling to find some detailed information regarding this request. Could someone point me in the right direction? I'm using the following Laravel package for OAuth2:
https://github.com/lucadegasperi/oauth2-server-laravel
As I understand, the user clicks the "Login with Facebook" button and then proceeds to authentication. Facebook provides the access token as a result. But how does a user account appear on our server? And to my knowledge, it is our server that should provide an access token which is tied to the user account on our database. Could someone clear this up?
Have you looked at the Facebook mobile sdk guides?
iOS: https://developers.facebook.com/docs/ios
Andriod: https://developers.facebook.com/docs/android/
The package you mention looks like it performs oAuth authentication, and I don't think you need that. If I understand correctly, you should be able to use the Facebook sdk to perform the authentication and tell your app that the user is authenticated. You will have to create a user account for them (for example, add a record to the users table in your database) and store their Facebook ID.
I'm using socialoauth (http://code.google.com/p/socialoauth/) to implement twitter & facebook logins for a web site. The site is php and mysql based.
I've got logins implemented and working, but I need to get the users screen name or email so that I can store their preferences about my site in a mysql database. I'm not sure how to go about getting their information once I've got the oauth_token and oauth_secret. I couldn't find any documentation or examples using socialoauth, aside from getting the logins working.
I downloaded twitteroauth (https://github.com/abraham/twitteroauth), and mismashed that together with socialoauth.php via this tutorial (http://net.tutsplus.com/tutorials/php/how-to-authenticate-users-with-twitter-oauth/) and was able to get the twitter user's information, but I would prefer to use only socialoauth.php because it does logins for both facebook and twitter.
Specific question: does anyone know which functions in socialoauth are used to get the user's information (hopefully for both twitter and facebook)? I'm very new to this, so it's possible I saw the function I needed while I was looking through the code, and simply didn't recognize it as what I needed.
Twitter does not provide access to users email addresses. The users Twitter screen_name should be returned in the same request you get their access token however.
With Facebook you have to ask for the email permission and then their email address should be accessible with the profile details.
I am using the Graph API for Facebook on my iPhone application. The problem is, I don't want the user to have to re enter their email address each time they want to login to integrate Facebook with my app. Is there a way to save and auto fill the login information using the Graph API?
Using the Graph API, there is no need for you to store the credentials, more than that, you should NOT store the credentials. As explained in the API dedicated help page the authentication process is handled by a secure token.
Meaning that if the user is already authenticated on Facebook using another application, it might be ( based on authentication process used ) already authenticated within your app.
You might check the token validity by using the isSessionValid method from the Facebook class.
Have a look to the iOS Facebook SSO link, it explains everything you need.
Having read the Facebook connect documentation I'm unable to determine what information I will have.
I realise I will have the Profile photo & Proxy email and access to a friends mechanism. I'm reasonably sure I will have access to First name and surname. Will I have access to things like Age?
EDIT: This isn't a Facebook APP, I'm using Facebook connect. RE: bobcat's response, can you still use Users.getInfo?
Once a facebook user has okayed your app, you can use the API including Users.getInfo which gives you the users birthday.
update As far as I can tell from the docs, when a user uses facebook connect to authenticate on a website, then the website can do anything that a facebook app could, with a few restrictions.
For some reason this post still came up when searching for something similar with Facebook login information, despite how old the post is.
Facebook is now using the term "FB.login" which was known as "Login with Facebook". It provides you with information that you request, whether that be an email and birthday, to profile information of their name and address, etc.
I found this link that will tell you the permissions you can request using FB.login here:
https://developers.facebook.com/docs/facebook-login/permissions/v2.0
There are plenty of options for requesting information and posting on their behalf.
I was searching for the access token information to keep the connection while registering or signing in. That information I found at the bottom of the next section of their documentation, found here:
https://developers.facebook.com/docs/facebook-login/access-tokens/