This gist will let you retrieve a series of tweets using the twitter v1.1 API. There's a few steps you have to do before you use this.
1. First, you need to go to http://dev.twitter.com/apps and create a new application.
2. You'll also need to download this library. https://github.com/themattharris/tmhOAuth (You only need the tmhOAuth.php file)
3. You might need to download this certificate (http://curl.haxx.se/ca/cacert.pem) and place it in the same folder as this php file.
You can call this php file directly to get the most recent tweets from the user owning the app.
You can also pass along some parameters
- tweets_json.php?count=10 //get the last 10 tweets
- tweets_json.php?count=10&screen_name=planetoftheweb //same as above from the planetoftheweb account (me)
- tweets_json.php?count=10&screen_name=planetoftheweb&callback=listTweets //same as above with a jsonp wrapper (listTweets();)
Watch the video on YouTube (https://www.youtube.com/watch?v=GQaPt-gQVRI)