Voting starts in March for the Drupal Association Board election.
The Drupal Twitter module adds support to authenticate Twitter accounts to Drupal user accounts, and pull and list its tweets. Once an authenticated Twitter account has been added (which means that it is an account that belongs to you and therefore you authenticate it by being redirected to Twitter.com), other non-authenticated Twitter accounts can be added too (you do not need to authenticate them).
This module also contain three sub-modules:
- Twitter actions: Adds actions to send Twitter messages when ever an Drupal action is run (thanks to Action and Trigger core modules). It also supports Rules.
- Twitter post: Implements a field to Post to Twitter when content is created or edited.
- Twitter Signin: Lets Drupal users log into Drupal through a Twitter account.
Install and enable modules
Create a Twitter application
In order to communicate with the Twitter API, you need to create a Twitter application at https://apps.twitter.com/. Go to https://apps.twitter.com/app/new and register (create) your application (Drupal site). Replace 127.0.0.1 by your website domain if you have one. If you do not, use these suggested values for Website and Callback URL fields. Twitter requires that you add a phone number to your twitter account before they'll provide access.
Set up application permissions
Go to the settings tab of your application and review the following permissions:
- If you want to Post to Twitter (using twitter_post submodule), then change the Access type to Read and write.
- If you want to Sign in with a Twitter account (using twitter_signin submodule), enable the checkbox.
Copy OAuth keys to your site
Go back to the "Details" tab of your application at http://dev.twitter.com and copy the Consumer key and Consumer secret keys into the Twitter module settings at Administration > Configuration > Twitter > Settings (/admin/config/services/twitter/settings).
Add Twitter accounts
You can add Twitter accounts from Administration-> Configuration-> Twitter (/admin/config/services/twitter) or by editing a user account with permissions to add Twitter account. Note that at least you need to authenticate a Twitter account (which means that it is an account owned by you). Here is an example:
Click to add an account. Once again, verify that the list of permissions you are giving is correct in case you later want to Post to Twitter.
After authorizing you will see your account listed and you will be able to pull tweets and mentions from Twitter.com by activating the checkboxes and saving changes.
There is also a new textfield to add non-authenticated accounts (any other Twitter account from which you do not know its password). You can pull tweets from these accounts too but not mentions.
Could not obtain a valid token from the Twitter API
If you get the following error message after trying to authorize your Twitter account:
Could not obtain a valid token from the Twitter API. Please review the configuration.
Please check the following:
- You have entered the right callback URL when creating the Twitter app. If you are testing on your local machine, this could be something like http://127.0.0.1:8000/twitter/oauth, or your local hostname: eg. http://mysite.local/twitter/oauth.
- Make sure the OpenSSL extension is enabled in PHP. Edit php.ini and check that the following line is not commented out: