How to get Keys for Google and Facebook?
To obtain Google and Facebook API keys, you will need to follow the steps below:
For Google API Key:
- Go to the Google Cloud Console and sign in with your Google account.
- Create a new project, or select an existing project.
- Go to the API Library and enable the “Google Identity Platform” API.
- From the left-hand menu, select “Credentials” and click the “Create Credentials” button.
- Select “OAuth client ID” from the dropdown menu.
- Choose the application type you want to create credentials for. In this case, choose “Web application”.
- Enter the authorized JavaScript origins and redirect URIs for your application.
- For the authorized JavaScript origins, enter the domain name where your application is hosted.
- For the redirect URIs, enter the URL that Google should redirect users to after they have authenticated with Google.
- Click “Create”.
- Copy the “Client ID” and “Client Secret” values that are generated.
- Use these values in your application’s code to enable Google Sign-In.
You can get your keys from this link:
https://developers.google.com/identity/gsi/web/guides/get-google-api-clientid
Note: Please make sure that your Redirect URL should be in this format
https://example.com?cubewp-social-login=google
For Facebook API Key:
- Go to the Facebook Developers website and sign in with your Facebook account.
- Create a new app by going to the “My Apps” dashboard and selecting “Create App”.
- Choose the app type that corresponds to your use case (e.g., website, iOS app, Android app, etc.).
- Configure your app settings, including the name, category, and contact information.
- Go to the “Dashboard” tab and copy your App ID and App Secret.
- Use your App ID and App Secret to authenticate your app and access the Facebook APIs.
You can get your keys with this link: https://developers.facebook.com/docs/development/create-an-app
Note: Please make sure that your Redirect URL should be in this format
https://example.com?cubewp-social-login=facebook
Where to add Keys?
- Go to CubeWP
- Navigate to CubeWP Settings
- Click Social Logins
- By default social logins will be disabled. Social logins can be enabled from CubeWP Settings
- Paste Client IDs
- Paste Client Secret IDs
