Problem with new API version. How to get last tweet of a user and number of his followers?


Hello, this is my first post in the developers section. I’ve a problem.

When there was the 1.0 API version, I hadn’t any problem, but since it changed, a web built in PHP that I made, where you introduce the screen_name of a twitter account in a input and it gets the number of followers, following, tweets, the profile images, and the last tweet don’t work.

I’ve been looking for the problem to solve it, but I can’t find it. I think that it seems to be something related to the authentification.

For example, I introduce this url in my browser: and it says:

{“errors”:[{“message”:“Bad Authentication data”,“code”:215}]}

What’s that? How can I get the number of followers of a twitter acount and the last tweet?

This is the code that I used in my web:

$data = json_decode(file_get_contents(‘’. $_GET[‘usuario’] .’’), true);
echo $data[0][‘statuses_count’];?>

And now it don’t runs.

Please help me. Thanks.