Skip to content

Instantly share code, notes, and snippets.

@mrmurphy
Forked from 1dolinski/new.js
Created January 2, 2014 03:18
Show Gist options
  • Save mrmurphy/8214566 to your computer and use it in GitHub Desktop.
Save mrmurphy/8214566 to your computer and use it in GitHub Desktop.
https://github.com/ttezel/twit
T.post('statuses/update', { status: 'hello world!' }, function(err, reply) {
// ...
})
// Question: how can I put this into a function such that the function returns reply?
// I tried:
function TWEET(username, count,){
T.get('statuses/home_timeline', { count: count, screen_name: username, trim_user: true, exclude_replies: true }, function (err, reply) {
return reply;
});
}
// but this doesn't return anything, I also tried to put return in front of the T.get portion.. it still does nothing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment