You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jhermsmeier edited this page Mar 20, 2012
·
1 revision
This example assumes that you have already got hold of a valid twitter OAuth accesstoken and OAuth token secret. This can be done either by using the node-oauth library to perform the usual workflow, or by using the 'my access token' functionality that twitter provides.
varOAuth=require('./lib/oauth').OAuth;oAuth=newOAuth("http://twitter.com/oauth/request_token","http://twitter.com/oauth/access_token",twitterConsumerKey,twitterConsumerSecret,"1.0A",null,"HMAC-SHA1");oAuth.post("http://api.twitter.com/1/statuses/update.json",twitterAccessToken,twitterAccessTokenSecret,{"status":"Need somebody to love me!"},function(error,data){if(error)console.log(require('sys').inspect(error))elseconsole.log(data)});