vendredi 30 octobre 2015

How to make a rest api with Facebook Authentication

I want to make an iOS app that need to communicate with a webservice/restful api to get data from a Mysql DB. Instead of implement my own user login module in my iOS app I want to use Facebook sdk/api. I'm using Laravel 5 to make my rest api (I'm new to laravel/php). So my question is how do I authorize the logged in facebook user?

I was thinking when a Facebook user login via my iOS app I save the required Facebook users data in a table called "users" with a post request from the iOS app. And let say a user has many images. So if I want to get all images for a certain user from my iOS app I will send the access-token to my webservice and from my webservice I'll find users id by using the access_token (making a post request to facebook api to get user details) and with the users id I can get the images that belongs to.

As said I'm new to all these technologies so if I'm wrong please correct me and help me further - Thank you

PS: I have read something called Social Authentication in laravel, but haven't digged deeper into it.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1khp6IS
via IFTTT

Aucun commentaire:

Enregistrer un commentaire