Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added docs

  • Loading branch information...
commit 80f2800293deff314e2af0338a3c492a42080dc8 1 parent 2e72eda
@masylum authored
Showing with 28 additions and 0 deletions.
  1. +28 −0 Readme.md
View
28 Readme.md
@@ -0,0 +1,28 @@
+# twitter-js
+
+Easy peasy twitter client
+
+## Usage
+
+twitter-js has two methods.
+
+*getAccesToken*: Uses oAuth module to retrieve the access_token
+*apiCall*: Does a call to twitter API.
+
+## Example
+
+ var twitterClient = require('twitter-js').twitterClient('consumerKey', 'consumerSecret');
+
+ twitterClient.getAccessToken({
+ redirect_uri: '/auth/twitter',
+ code: req.param('code'),
+ },
+ function (error, token) {
+ if (token) {
+ facebookClient.graphCall('GET', 'me', {access_token: token.access_token}, function (error, result) {
+ sys.puts(sys.inspect(result));
+ });
+ }
+ }
+ );
+

0 comments on commit 80f2800

Please sign in to comment.
Something went wrong with that request. Please try again.