Empty screen_name in Abraham's TwitterOAuth


I have been using Abraham’s TwitterOAuth for months and it was working ok.
I don’t really know when exactly this problem happened but a few days ago I discovered Twitter Connect in my script isn’t working.

/* If method is set change API call made. Test is called by default. */
$user_info = $connection->get('account/verify_credentials');

        // Something's wrong, go back to square 1  
        header('Location: twitter_login.php'); 
    } else { 
        // Let's find the user by its ID  
		$query = "SELECT * FROM members WHERE username ='" .$user_info->screen_name ."'";  
		$result = $conn->execute($query);
        // If not, let's add it to the database  

Actually this code results in empty search. So I echoed $user_info->screen_name and found it always returns empty result.
I really don’t know what the problem is.
Any help?


Is there anything in $user_info?


stdClass Object ( [errors] => Array ( [0] => stdClass Object ( [message] => Bad Authentication data [code] => 215 ) ) )


@abraham any hope? :\


Problem is partially fixed.
Since I only needs screen_name value to check the database, I tried to echo $access_token in callback.php file.
I found that screen_name value exists. That solved my problem by moving the rest of my code to callback.php
I hope this may help anyone.
Best Regards

closed #6