Skip to main content

Twitter

Twitter provider can be used for both authentication and integration. In this section you learn about the steps to add providers of type Twitter to your project.

Authentication

In order to give your users the option to sign up/in in your application with Twitter, follow these steps:

  1. Start the wizard for creating a Provider to get the callback URL (the URL your users will be redirected to after successful authentication with Twitter)
  2. Create a Twitter OAuth application
  3. Finish the wizard you started in step 1 with the credentials created in step 2

Get the callback URL

Create Twitter OAuth Application

  • Go to https://developer.twitter.com.
  • Click on Sign in at the top right to log in.
  • Click on + Create Project.
  • Enter your project name, click Next.
  • Select your use case, click Next.
  • Enter a description for your project, click Next.
  • Enter a name for your app, click Complete.
  • Copy and save your API Key (this is your client_id).
  • Copy and save your API Secret Key (this is your client_secret).
  • At the bottom, under Next, setup your App click the link enable 3rd party authentication.
  • Under App Settings, click on the gear icon next to your app name to go to App Settings.
  • At the bottom, next to Authentication settings, click Edit.
  • Turn Enable 3-legged OAuth ON.
  • Turn Request email address from users ON.
  • Paste your Callback URL. (that was copied in the last step of Create DoTenX Provider (part 1))
  • Enter your Website URL.
  • Enter your Terms of service URL.
  • Enter your Privacy policy URL.
  • Click Save.

Use the Twitter application credentials

  • Back to add DoTenX Provider tab
  • Paste Key of your Twitter application (client_id) in Key field.
  • Paste Secret Key of your Twitter application (client_secret) in Secret field.
  • Enter your front-end url that your users will redirect here (with his/her tokens as query parameter) when they was authenticated by Twitter
  • Add this two scopes in Scopes field (tweet.read, users.read)
  • Click on Add Provider

Test functionality