Skip to content

Instantly share code, notes, and snippets.

@tanepiper
Created June 22, 2012 12:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tanepiper/84d238498242eb333fd0 to your computer and use it in GitHub Desktop.
Save tanepiper/84d238498242eb333fd0 to your computer and use it in GitHub Desktop.
d.on('remote', function(remote) {
console.log('remote', remote, u);
var user = instance.users[req.session.user.id + ':' + req.session.user.screen_name];
user.remote = remote;
if (!user.stream) {
user.twitter.verifyCredentials(function(err, profile) {
user.profile = profile;
session.profile = profile;
user.twitter.stream('user', function(tstream) {
user.tstream = tstream;
tstream.on('data', require(instance.options.base + '/apps/twitter/lib/on_stream_data')(instance, user, remote));
tstream.on('error', require(instance.options.base + '/apps/twitter/lib/on_stream_error')(instance, user, remote));
tstream.on('destroy', require(instance.options.base + '/apps/twitter/lib/on_stream_destroy')(instance, user, remote));
});
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment