I am developing an open source Wordpress plugin that allows users to create a Wordpress account by simply using their Twitter account (uses tmhOAuth library). Here’s the code for the plugin: https://github.com/luckyshot/wp-twitter-login/blob/master/twitterlogin.php
Usually it would run function login (line 110) and redirect the user to Twitter. The user would authorize and come back to the website in a URL like:
http://mywebsite.com/?oauth_verifier=…
The plugin would detect the Twitter reply through this (line 71):
}else if(isset($_REQUEST[‘oauth_verifier’])) {
Problem is that for some users it just redirects them to:
http://mywebsite.com/
And there is no GET or POST or any other parameter returned by Twitter.
This problem just happens with some users, I’ve updated tmOAuth library to its latest version, tried it in several Wordpress installations, cleared cookies, cache and session from both domains, etc.
Is there anything I am doing wrong? Should I detect the callback from Twitter another way? Or is there something wrong with Twitter or OAuth?