This project is part of the Drupal Social Initiative and is based on the Social API.

Social Auth Twitter allows users to register and login to your Drupal site with their Twitter account. This module is based on Social Auth and Social API projects

This module adds a path user/login/twitter which redirects the user to Twitter for authentication.

After Twitter has returned the user to your site, the module compares the user id or email address provided by Twitter. If the user has previously registered using Twitter or your site already has an account with the same email address, the user is logged in. If not, a new user account is created. Also, a Twitter account can be associated to an authenticated user.

Login process can be initiated from the "Twitter" button in the Social Auth block. Alternatively, site builders can place (and theme) a link to user/login/twitter wherever on the site.

Configuration

Version 3.x

Only OAuth 1.0a is supported in the 3.x branch.

In Drupal

  1. Log in as an admin.

  2. Navigate to Configuration » User authentication » Twitter and
    copy the Callback URL field value (the URL should end in
    /user/login/twitter/callback).

In Twitter Developer Portal

  1. Log in to a Twitter account.

  2. Navigate to Projects & Apps » Overview.

  3. Under Standalone Apps click Create App.

  4. Enter an app name and click Next.

  5. Copy the API Key, API Key Secret, and Bearer Token and save them
    somewhere safe.

  6. Click App settings.

  7. Ensure the app has Elevated Access.

    1. Click Apply next to the message "Do you need Elevated access for your Project?" if it appears.

    2. Fill in all required basic info fields and click Next.

    3. Fill in all required intended use fields and click Next.

    4. Review the settings and click Next.

    5. Carefully read the Developer Agreement, tick the acknowledgement box and click Submit.

    6. Approval should be immediate. Navigate back to Projects & Apps and click the app name to return to the app settings page.

  8. Under User authentication settings click Set up.

  9. Toggle "OAuth 1.0a" (to enable it).

  10. Optionally toggle "Request email from users" (to enable it).

  11. Paste the URL copied from Step 2 in the Callback URI / Redirect URL field.

  12. Fill in other required and optional fields as desired.

  13. Click Save.

In Drupal

  1. Return to Configuration » User authentication » Twitter

  2. Enter the API Key in the Client ID field.

  3. Enter the API Key Secret in the Client secret field.

  4. Click Save configuration.

  5. Navigate to Structure » Block Layout and place a Social Auth login block
    somewhere on the site (if not already placed).

Supporting organizations: 
Ongoing maintenance
Mentors solved queries related to this module

Project information

Releases