Facebook and Google + authorized logon, facebookgoogle
In reality, third-party applications such as Facebook and Google + are required to log on to their Web applications (Android and IOS Mobile apps may also exist), which are essentially official js sdk applications. At this time, I had to go to their official documents.
NOTE: If all the connections cannot be opened, please flip through the Q ..........
Reference:
1. facebook: https://developers.facebook.com/docs/facebook-login/web
2, google: https://developers.google.com/identity/sign-in/web/sign-in#add_a_google_sign-in_button
I. Preparations
--- Facebook
1. You must have an appid when logging on to facebook.
2. After creating an application and installing the application, complete the settings (it must be https or cannot be connected normally). You can use the official default button or custom button to log on to the application.
--- Google
1. clientid (Oauth2.0 Client ID) is also a required parameter for authorized logon. The official statement is the Client ID corresponding to the application credential. You must go to https://lele.developers.google.com/apis/credentialsto create the application credential.
2. After creating the app creden, go to https://console.developers.google.com/apis/libraryto enable the app service. This is the Web Client (corresponding to social networking> G + and Google People APIs, which are enabled in the app creden created by yourself)
2. obtain user information based on the api in the official documentation (log on or register)
3. The following is an Online DEMO (all the required parameters are self-registered for testing. Here they are in plain text and need to be processed in practice)
Https://wjf444128852.github.io/demo01/login/
Iv. Problems Encountered
After testing, this error occurs only when Google logs on to chrome (32-bit): {error: "popup_closed_by_user"}, and 64-bit chrome is also normal. All other browsers are normal.
There are also official issues: https://github.com/google/google-api-javascript-client/issues/405
Wait for resolution...