Mild Fuzz
Mild Fuzz

Reputation: 30823

trying to fetch user tweet stream in php

I am using the following code, but it showing a 404 error

$url = "http://api.twitter.com/version/statuses/user_timeline.json";

$call = file_get_contents($url);

Upvotes: 0

Views: 301

Answers (1)

ceejayoz
ceejayoz

Reputation: 180177

There's no 'version' version. The Twitter API is currently version 1, so you need http://api.twitter.com/1/statuses/user_timeline.json.

Do note that Twitter can't read your mind, so you'll need to tell Twitter which user's timeline you want to fetch... i.e. http://api.twitter.com/1/statuses/user_timeline.json?screen_name=ceejayoz

Upvotes: 2

Related Questions