Help help help!
I have made a website + a project in Arduino that both fetches tweets from my own twitter account and acts according to these. Today the twitter API changed to version 1.1 and now my website doesn’t work. I am supposted to present my project for an exam tomorrow, so I am in complete panic.
On my website I have been using javascript with this code:
var twitter_api_url = 'http://search.twitter.com/search.json';"
$.getJSON( twitter_api_url + '?callback=?&rpp=5&q=from:' + twitter_user, function(data) { ".
This is not working and I don’t know how to change it.
In Arduino I call:
client.println("GET /1/statuses/user_timeline.xml?screen_name=MYTWITTER HTTP/1.1");
client.println("Host:api.twitter.com");
client.println("Connection:close");
client.println();
I get error message 410 (gone) and “The Twitter REST API v1 will soon stop functioning. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview”.
I have tried searching for fixes but I can’t find the correct solution. I think that I might need to make an OAuth authentication? I found a guide to create parametres for this “http://www.slideshare.net/Tweetganic/generate-twitter-applications”, but I don’t know how to add the parametres to javascript or Arduino.
I found a suggestion for Arduino:
client.print(F("GET /1/statuses/user_timeline.xml?screen_name=MYTWITTER HTTP/1.1"));
client.print(F("HOST: api.twitter.com"));
client.print(F("Authorization: OAuth oauth_consumer_key=\"XXX\", oauth_nonce=\"XXX\", oauth_signature=\"XXX\", oauth_signature_method=\"HMAC-SHA1\", oauth_timestamp=\"1361444134\", oauth_token=\"XXX\", oauth_version=\"1.0\""));
client.println();
client.println();
But I don’t know what oauth_nonce and oauth_signature and oauth_timestamp is supposed to be. Another user also replied that this didn’t work, so I don’t know if I want to continue with it.
Can someone please help me, thanks?