Reputation: 5870
I am a newbie to oAuth and twitter api, what I want to do is fetch user's timeline. I have registered my app and have got my keys. Is there any simple method to authenticate and fetch the data in php? I don't want to use any external libraries and class for now because I want to learn the internal workings too. :)
Here are my basic cURL request code:
$url = 'https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=user';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output=curl_exec($ch);
curl_close($ch);
echo $output;
But how to authenticate???
Upvotes: 0
Views: 96
Reputation: 1951
I would suggest the course of Ray Villalobos, an author at lynda.com - he tells you how to do such a thing on his website. Good luck!
Upvotes: 1