I recently encountered this message while trying to use the Drupal Twitter Module to access a twitter application:
Could not obtain a valid token from the Twitter API. Please review the configuration.
The message was caused by the Callback field in the twitter application setup not being filled in.
Enter the following in the Callback field
Twitter 7.x Module Installation (http://drupal.org/node/1346824)