1

I developed a software that includes a Laravel component that has a website, and then 2 apps (iOS and Android) that consume services from that Laravel component. I have users on my database schema, those users come from all system components. Now I want to add Facebook Login for users so that they don't have to fill in their information. But I want to add this login to my website and my 2 apps.

What do I need to do on my Back-end and database to integrate the solutions? so that if a user logins with Facebook on my website and then logins with facebook on my iOS app, I can see they are the same?.

Thank you

Joaquin Colella
  • 95
  • 2
  • 12
  • download and use the facebook api, use the necessary data you need for your login, etc. – Kevin Aug 18 '16 at 22:20
  • Way too broad of a question. This needs refinement. Laravel Socialite is the very first place you should look. – Ohgodwhy Aug 18 '16 at 23:09

2 Answers2

0

In your database add a Facebook_id column, if all your apps are pulling from the same database, then that should solve your problem of knowing they are the same.

when a user signs up to your site using Facebook , Facebook will give you back thier Facebook_id, every time a user logs back into your site from Facebook, Facebook looks for that id and sees if the access token provided by them is valid. If its valid it signs the user back into your app/site

https://github.com/SammyK/LaravelFacebookSdk is a great Laravel Facebook SDK

Luna
  • 537
  • 1
  • 12
  • 26
-1

The best way will be for you to used laravel socialite https://github.com/laravel/socialite.

also check this https://stackoverflow.com/a/30590747/6726714

Community
  • 1
  • 1
  • Welcome to Stack Overflow! Whilst this may theoretically answer the question, [it would be preferable](//meta.stackoverflow.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. – Enamul Hassan Aug 19 '16 at 01:55