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');
if(isset($user_info->error)){
// 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?