Changes to OAuth are causing issues with TwittFilter

At the beginning of July, there was a change in OAuth that restricts apps from reading direct messages.  To fix this, you need to go to your app settings in Twitter,

Change it from read & write, to read & write & direct messages.

Next you need to change a line in twitteroauth.php .

Around line 91 find the following..

function getAuthorizeURL($token, $sign_in_with_twitter = TRUE) {

Change TRUE to FALSE.

Then look for these 3 lines..

if (is_array($token)) {
$token = $token[‘oauth_token’];

Add the following line..

return $this->authorizeURL() . “?oauth_token={$token}”;

For awhile, this was not working for me till I realized that the OAuth token will be changed.  As such, I have to delete the token information out of the database each time I clear the session.  Course, this is proper practice anyway, so I was a victim of my own oversight.

Now, I just need to look for the 403 error and ask the user to clear there session and log back in again.  No fun for the user, but thats how it goes.  For those people how are using the automated processes of TwittFilter, well, I guess I will have to send an email out letting people know they have to go into TwittFilter, logout and log back in again… Sigh.. Thanks Twitter.

Leave a Reply