Skip to main content
Fix numbered list. Minor spelling and branding.
Source Link
user40980
user40980

Using server side facebookFacebook api a typical workflow can be:

1 - User click in "login with facebook"

2 - A popUp window with the facebook login appears

3 - The user put his facebook username and password and click submit

4 - You receive a callback from facebook with a token.

5 - With this token you go to facebook auth service (https://graph.facebook.com/oauth/access_token with your concrete parameters), you receive and access_token.

6 - with this access_token you can get the user information, user id in facebook, username, email, picture, etc,etc.

7 - With this information you can check if this user already exists in your system or create a new one if is the fist time.

  1. User click in "login with Facebook"
  2. A popUp window with the Facebook login appears
  3. The user put his Facebook username and password and click submit
  4. You receive a callback from Facebook with a token.
  5. With this token you go to Facebook auth service (https://graph.facebook.com/oauth/access_token with your concrete parameters), you receive and access_token.
  6. with this access_token you can get the user information, user id in Facebook, username, email, picture, etc,etc.
  7. With this information you can check if this user already exists in your system or create a new one if is the fist time.

This is the typical Oauth2 workflow, very confusing the first time you use it. The good thing is that other social networks like linkedinLinkedIn, twitterTwitter or google+Google+ use a very similar approach based in Oauth (with some differences for example in the way you express the concrete permissions you want and some other details).

Another option its to use the facebookFacebook js api to do the login, this option its explained in the facebookFacebook docs: https://developers.facebook.com/docs/facebook-login/login-flow-for-web/v2.1 (the option with FB.login() itsFB.login() it's in my opinion easier and cleaner). The problem with this approach its that itsit's not very standard and each provider can have very different approaches. (and if you use a lot of login providers you need to load a lot of js libraries only for login).

Using server side facebook api a typical workflow can be:

1 - User click in "login with facebook"

2 - A popUp window with the facebook login appears

3 - The user put his facebook username and password and click submit

4 - You receive a callback from facebook with a token.

5 - With this token you go to facebook auth service (https://graph.facebook.com/oauth/access_token with your concrete parameters), you receive and access_token.

6 - with this access_token you can get the user information, user id in facebook, username, email, picture, etc,etc.

7 - With this information you can check if this user already exists in your system or create a new one if is the fist time.

This is the typical Oauth2 workflow, very confusing the first time you use it. The good thing is that other social networks like linkedin, twitter or google+ use a very similar approach based in Oauth (with some differences for example in the way you express the concrete permissions you want and some other details).

Another option its to use the facebook js api to do the login, this option its explained in the facebook docs: https://developers.facebook.com/docs/facebook-login/login-flow-for-web/v2.1 (the option with FB.login() its in my opinion easier and cleaner). The problem with this approach its that its not very standard and each provider can have very different approaches. (and if you use a lot of login providers you need to load a lot of js libraries only for login).

Using server side Facebook api a typical workflow can be:

  1. User click in "login with Facebook"
  2. A popUp window with the Facebook login appears
  3. The user put his Facebook username and password and click submit
  4. You receive a callback from Facebook with a token.
  5. With this token you go to Facebook auth service (https://graph.facebook.com/oauth/access_token with your concrete parameters), you receive and access_token.
  6. with this access_token you can get the user information, user id in Facebook, username, email, picture, etc,etc.
  7. With this information you can check if this user already exists in your system or create a new one if is the fist time.

This is the typical Oauth2 workflow, very confusing the first time you use it. The good thing is that other social networks like LinkedIn, Twitter or Google+ use a very similar approach based in Oauth (with some differences for example in the way you express the concrete permissions you want and some other details).

Another option its to use the Facebook js api to do the login, this option its explained in the Facebook docs: https://developers.facebook.com/docs/facebook-login/login-flow-for-web/v2.1 (the option with FB.login() it's in my opinion easier and cleaner). The problem with this approach its that it's not very standard and each provider can have very different approaches. (and if you use a lot of login providers you need to load a lot of js libraries only for login).

Source Link
AlfredoCasado
  • 2.2k
  • 12
  • 11

Using server side facebook api a typical workflow can be:

1 - User click in "login with facebook"

2 - A popUp window with the facebook login appears

3 - The user put his facebook username and password and click submit

4 - You receive a callback from facebook with a token.

5 - With this token you go to facebook auth service (https://graph.facebook.com/oauth/access_token with your concrete parameters), you receive and access_token.

6 - with this access_token you can get the user information, user id in facebook, username, email, picture, etc,etc.

7 - With this information you can check if this user already exists in your system or create a new one if is the fist time.

This is the typical Oauth2 workflow, very confusing the first time you use it. The good thing is that other social networks like linkedin, twitter or google+ use a very similar approach based in Oauth (with some differences for example in the way you express the concrete permissions you want and some other details).

Another option its to use the facebook js api to do the login, this option its explained in the facebook docs: https://developers.facebook.com/docs/facebook-login/login-flow-for-web/v2.1 (the option with FB.login() its in my opinion easier and cleaner). The problem with this approach its that its not very standard and each provider can have very different approaches. (and if you use a lot of login providers you need to load a lot of js libraries only for login).