Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Windows Azure Mobile Services Scheduler
function CheckFeed() {
getUpdatesAndNotify();
}
var request = require('request');
function getUpdatesAndNotify() {
request('http://search.twitter.com/search.json?q=@cloudnick&rpp=2',
function tweetsLoaded (error, response, body) {
var results = JSON.parse(body).results;
if(results){
results.forEach(function visitResult(tweet){
sendNotifications(tweet);
});
}
});
}
function sendNotifications(tweet){
var channelTable = tables.getTable('Channel');
channelTable.read({
success: function(channels) {
channels.forEach(function(channel) {
push.wns.sendTileWideSmallImageAndText04(channel.uri, {
image1src: tweet.profile_image_url,
text1: '@' + tweet.from_user,
text2: tweet.text
});
});
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.