I’m developing on an app for Android where the user is able to login with his Facebook account. Also, i want to store some input of the user in a mysql database. On the server side, i know will check wether the user has logged in with Facebook (in reason of security risks) so that just users which has logged in with Facebook can access the database. How will i manage this? The Facebook authentication is no problem for me, but i don’t have a solution to check the login status on my website. Thanks for your help!
Share
You need to save / share the AccessToken. Consider the access token like a Session ID in PHP.
In PHP, using the SDK, you need getAccessToken() and setAccessToken() functions (also tell the Facebook API not to use cookies)* and you share this value.
For Mobile, I’ve not used Facebook Auth in Android Java, but I have with Titanium for mobiles, and the calls are exactly the same (Titanium.Facebook.getAccessToken). Works very smoothly when you pass it back ot PHP. The Facebook Java SDK also has
in the Facebook class. So you’ll need to use those calls or whatever SDK your are using for Android.