The extension is written in Javascript and currently has the task of monitoring a specified Twitter accountâs tweets utilizing Twitterâs rest API version 1.0 to GET new tweets and $parse them.
***What is needed is to upgrade the current rest API 1.0 to twitterâs streaming API 1.1 by authenticating the program using oAuth. Also to use the âfollow=UserIDâ parameter to follow a twitter account so the user can edit the UserID of what account to follow ***
A sample of the code that needs to be altered is located here:
var req = new XMLHttpRequest();
function test() {
req.open(
âGETâ, âhttps://api.twitter.com/1/statuses/user_timeline.json?screen_name=nikestore&count=1550&exclude_replies=true&trim_user=trueâ,
true);
req.onload = showTweets;
req.send(null);
setTimeout(test, 3000);
}
function showTweets() {
var data = req.responseText;
var tweets = $.parseJSON(data);
The extension also has the script to open specified tweets that match a corresponding âkeywordâ in a new google chrome tab, but I donât think that portion of code needs to be altered.