How to fix the Twitter blogger.js script and make it work with the oAuth required by the v1.1 API
There is a straightforward procedure to get it back running again by replacing
By a call to a .php file that generates the same thing, but while authenticating to the proper twitter application you will be creating.
You would need to mostly follow the steps illustrated here:
In short, here’s how you can get it up and running quickly:
1. Setup a twitter application at https://dev.twitter.com/apps/ (logging in with your own credentials). Save the consumer key & secret and access token & secret.
2. Download the TwitteroAuth library from here. You are only interested in the twitteroauth folder and it’s two files, which you will place next the .php script you are creating.
3. Create a twitterfeed.php file with the content provided in the tutorial, and fill in the variables (twitteruser / number of tweets and all the keys you’ve created at step 1):
You can download my version from here: http://cl.ly/code/1e1C3u2Z1U1c
I’ve only made an adjustment to the json_encode($tweets) part of the script by adding the twitterCallback2 which calls the old blogger script, which lets you use this cross-domain regardless of the server settings.
4. Upload the twitterfeed.php along the twitteroauth with the two files inside next to it to a server running PHP 5+.
5. Replace the old http://api.twitter.com/1/statuses/user_timeline.json call by one pointing to your newly created .php file, like this: