I have an app on both iOS and Android that has the option to login via Facebook.
If I register and login from Android, I can use that type of login on every Android device ( just enter Facebook mail and password and login is ok ). If I use the same account on iOS, the register screen appears. Same thing if I first register the account on iOS and then try to use it on Android.
I'm getting different Facebook user ids on the 2 operating systems. On Android I use socialauth from Google, and on iOS I use the details from the integrated Facebook app.
The id is stored on a server and when an user try to login with Facebook it compares the id with the one stored.
How can I generate an unique Id both on Android and iOS for the same account?
I assume you are using 2 different Apps. You need to use the exact same App to get the same User ID, you donĀ“t get the global ID anymore but only an "App Scoped ID". Check out the changelog for more information: https://developers.facebook.com/docs/apps/changelog
Thanks for the reply. I fixed this issue by registering the app on https://developers.facebook.com/apps and setting the iOS and Android details. Also I changed to Facebook SDK on both platforms.
Related
Yesterday I logged in to Airbnb with my Facebook account on my OSX. Shortly later I got a notification both on my iPhone and computer saying
"Airbnb is available to install on your iPhone"
My question is, does anyone here know how this was done? Is this a feature available to anyone who creates Facebook login? Any advice on how this was done is well appreciated.
Sincerely
Axel
I bet the notification is sent to you by Airbnb, right? If so, it's pretty easy to do. You give your facebook account information to Airbnb by login with facebook in there webpage. Then they just send a graph api request to facebook with your authorization access token, and you get an notification. For details you can refer to doc here: https://developers.facebook.com/docs/games/notifications
I found out what I was talking about. Facebook is adding a new feature which ask users if they want to get a link to the mobile app.
This is in Beta right now but you will automatically eligible for the feature if:
You have integrated the new Facebook Login on your website. You must be using at least version 2.0 of the Graph API and Login Dialog. Send to Mobile is not available for apps which invoke the Login dialog using Graph API v1.0.
You have integrated Facebook Login into your iOS or Android app. The "Single Sign On" switch within iOS and Android section of your app's dashboard must be set to "Yes"
Added your iOS App Store ID and/or the Android package name under which your app is listed in Google Play to your Facebook app's dashboard.
https://developers.facebook.com/docs/facebook-login/send-to-mobile
I am working on android application using parse.com services. I am login through users credentials but after login i want to get the users number from facebook just like email address, last name. Please guide me a way to get user mobile number using android platform
Thanks in advance
Facebook has retracted these features of the API due to privacy concerns.
Source: Here
There is no way to get the mobile number of a Facebook user via the Graph API. Even not if the user set it to public.
Please refer this link https://developers.facebook.com/docs/graph-api/reference/v2.1/user/#fields
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..
I have two apps which have same name and same functions. One in android market and one in app store. Currently only with iphone app you can post your score on your facebook wall using the facebook app i created. My question is can i use same app for android also to post the score on user's wall? Will it create any problems if i do that?
Yes, you can use the same application ID. You should, in fact, as it'll prevent you from having analytics and user permissions split between the two.
On the facebook developer page you can set how you will use the login account. Than you can select mobile application and set Android and iOS.
whatever you use for creating app either iPhone, android, blackbarry etc. same app id used in all mobile application.
I need help using the facebook test users from android.I am using the facebook android sdk and i need to be able to login as a test user and do actions like publish to the stream. I do not want to use the developer account associated with this application since it is my personal account. I realize that test users can only be created using api calls and such a call returns the login url, i understand how to use this in a browser but how can i use it in my android application. Can i create a dummy account and work with that account or is this against facebook policy.
Test users can also be created with GUI - not only by API calls. GUI is useful if You need to handle just few users. If there is a plenty of them - it is easier to use API and perform it programatically.
How to handle test users by FB GUI:
Go to FB developer site, where You created FB Application
on application tab, click Edit Roles
At the bottom of the page there is 'Test users' section where all test users are listed. This is where test users can be created and edited. Each user has option to log in as this user, change his name and set password next to his profile photo.
You have to set user's password to be able to login as him
Use his profile email address and password to login - it is also possible from Your app
You can create a dummy account but this is against FB policy and FB really does everything to make it harder to You :) This is not an option. Use test users.
If more info is needed on the topic - see my article, regarding test users strategy.
All the detail see on the official FB page
See an open bug in facebook. You can't login as test user with native Android app, but login with m.facebook.com should work
https://graph.facebook.com/me?access_token=ACCESS_TOKEN
where the access_token is the token from when the user approved your app. Found it here.