I have created an android app for Facebook integration with single user Login. Now i want Multiple user Login in the same application. How can i do this. Please give some suggestions with any android code or usable link. Thanks in advance :)
The facebook android SDK is trying to use the SSO if the device has the facebook application (katana) installed.
If the SSO is used then you have no way of doing so, the authorize method will always use the logged in user in the katana and so you'll have to ask the user to manually logout in the main facebook application.
What you can do is call authorize without the sso as expalined here: How to disable Facebook single sign on for android - Facebook-android-sdk.
Related
I'm new to Facebook SDK.
So as far as I read from their tutorial, when you use custom button with their loginManager, it starts an intent of webview or the native FB app to ensure the login.
So my question, is there a way to make it custom ? like using edittext of android to get the username/password then start the login session.
Thanks.
Regards.
You can not do that for security reasons. With the facebook sdk, your app open a webview or the facebook app if the user already has installed.
If you want to save some user data, you have to set the proper permissions and you can get it with the user token and the facebook graph api.
Regards!!
I developed an android app which consists facebook login through graph api.
I created the new app in facebook developers from my account and corresponding app_id is configured in android. So here I am able to login with facebook with my account successfully.
But if I ask other user to login it is throwing below error.
App not set up: the developer of this app has not set up the app properly for facebook login
So what is missing here to make it login for all fb users.
Could someone please guide me to reach my intention. TIA.
To make Facebook login working on other's account you need to make it available in the facebook developer console.
Do you want to make this app and all its live features available to the general public?
Turn that to yes and app is available to all the users.
I am building an application which needs user credentials for multiple users. If SSO is enabled, then I cannot logout the user (provided Facebook app is installed on the device) after using our application. The session persists, and the only method for logging out the user is via the facebook app, before the next user can login to our application.
So, I need the SSO disabled, so that it is independent of the facebook app on the device.
I have seen the problem being queried here: Disabling and Enabling Single Sign On in Facebook as Required
I know that in SDK 2.0, it could have been done using FORCE_DIALOG_AUTH, but in SDK 3.*, how do I go about it?
http://developers.facebook.com/docs/tutorials/androidsdk/3.0/upgrading-from-2.0-to-3.0/
P.S.: Any other method of making the login and logout independent of the facebook app will also work
See setLoginBehavior in the OpenRequest that you pass to Session.openFor[Read|Publish] - https://developers.facebook.com/docs/reference/android/3.0/Session.OpenRequest#setLoginBehavior%28SessionLoginBehavior%29
You can set it to SUPPRESS_SSO which will use the web dialog instead of SSO - https://developers.facebook.com/docs/reference/android/3.0/SessionLoginBehavior#SUPPRESS_SSO
I am working on an application where I need to integrate the social functionality of Facebook.
What I want is to know if the user is already connected to Facebook through a Facebook application or some other application that uses Facebook, and use this authentication. That means that if the user is already connect to Facebook through his device I recognize that and use it in my application - not ask the user for a new login.
Is it possible?
I found a lot stuff in the web, but nothing is related to that. I already downloaded the facebook SDK and added it to my project. I saw that there is a method (facebook.getAccessToken()) to get the access token, but I think I can use it only if the user do his first login in my application.
Any help would be great.
Thanks.
That means that if the user is already connect to Facebook through his device I recognize that and use it in my application - not ask the user for a new login.
Yes it is possible..This is called as Single-Sign-On in facebook , by default Single-Sign-On is enabled. One and only thing you have to do is that you need to generate Hash Key and Register with your Application created in Facebook.
Also it is possible to disable Single-Single-On by passing an extra parameter as below :
authenticatedFacebook.authorize(context PERMISSIONS,-1,new LoginListener());
-1 - refers disabling SSO
Single-Sign-On is clearly explained in Facebook Documentation..
Is it possible to login into facebook using my own login form in Android & get the facebook user id? I just want to validate the users without need them access their facebook.
In the Android facebook tutorial, the app have to open facebook first so that user can login but there is no automatic close after user login successfully.
Thanks in advance
No, you don't have a way to log the user in through facebook without using their official endpoints.
You can open some sort of browser with the authentication dialog (or the open graph one) but that still mean using their forms/ui (what ever you want to call it).
You should just use the android sdk without using the SSO, that way the sdk won't call the facebook application that is installed on the device (if at all) and will just call the auth dialog for you.
This is a better solution for you since it "abstracts" some things from you, takes care of the access token and more.
Here's a thread about disabling the SSO: How to disable Facebook single sign on for android - Facebook-android-sdk