Manspof
Manspof

Reputation: 357

Facebook log in in ionic 2 Rc 0

I want to make log in with facebook in my ionic 2 app.. Im not sure how to do that. All the tutorials i saw,explain how to do it with firebase database but all my project already in MySql. anyone can explain me how can i do that with MySql?

Upvotes: 0

Views: 84

Answers (1)

tanya
tanya

Reputation: 516

Web-based login

Logging in to your app with Facebook will require a few steps:

  1. Sign up as a Facebook developer to get an API key
  2. From your app, redirect users to Facebook to log in
  3. Handle the returned login result from Facebook
  4. Store the user access token for that user in your database

See the Facebook Web Login Docs for details on how to do this. Ionic apps are web apps so you use the web instructions not Android or iOS.

Native Login

You can alternatively use "native login" which is where the user's Facebook app on their phone is used as the login mechanism.

There is an app demonstrating this approach here: https://github.com/fuffenz/ionic2-native-facebook-login

This second approach will not work in a web browser using ionic serve

Upvotes: 2

Related Questions