Skip to content

Commit 7e6d0dd

Browse files
author
Matt Revelle
committed
added use of access token secret
1 parent 3cbcaf9 commit 7e6d0dd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/twitter.clj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
(def *oauth-consumer* nil)
1717
(def *oauth-access-token* nil)
18+
(def *oauth-access-token-secret* nil)
1819
(def *protocol* "http")
1920

2021
;; Get JSON from clj-apache-http
@@ -23,9 +24,10 @@
2324

2425
(defmacro with-oauth
2526
"Set the OAuth access token to be used for all contained Twitter requests."
26-
[consumer access-token & body]
27+
[consumer access-token access-token-secret & body]
2728
`(binding [*oauth-consumer* ~consumer
28-
*oauth-access-token* ~access-token]
29+
*oauth-access-token* ~access-token
30+
*oauth-access-token-secret* ~access-token-secret]
2931
(do
3032
~@body)))
3133

@@ -59,6 +61,7 @@ take any required and optional arguments and call the associated Twitter method.
5961
*oauth-access-token*)
6062
(oauth/credentials *oauth-consumer*
6163
*oauth-access-token*
64+
*oauth-access-token-secret*
6265
~req-method
6366
req-uri#
6467
query-params#))]

0 commit comments

Comments
 (0)