Permalink
Browse files

added use of access token secret

  • Loading branch information...
1 parent 3cbcaf9 commit 7e6d0dd66f50f11a11bafc139f3ec1be89c38b71 Matt Revelle committed Sep 4, 2009
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/twitter.clj
View
@@ -15,6 +15,7 @@
(def *oauth-consumer* nil)
(def *oauth-access-token* nil)
+(def *oauth-access-token-secret* nil)
(def *protocol* "http")
;; Get JSON from clj-apache-http
@@ -23,9 +24,10 @@
(defmacro with-oauth
"Set the OAuth access token to be used for all contained Twitter requests."
- [consumer access-token & body]
+ [consumer access-token access-token-secret & body]
`(binding [*oauth-consumer* ~consumer
- *oauth-access-token* ~access-token]
+ *oauth-access-token* ~access-token
+ *oauth-access-token-secret* ~access-token-secret]
(do
~@body)))
@@ -59,6 +61,7 @@ take any required and optional arguments and call the associated Twitter method.
*oauth-access-token*)
(oauth/credentials *oauth-consumer*
*oauth-access-token*
+ *oauth-access-token-secret*
~req-method
req-uri#
query-params#))]

0 comments on commit 7e6d0dd

Please sign in to comment.