clojure-twitter icon indicating copy to clipboard operation
clojure-twitter copied to clipboard

No such namespace: oauth

Open natesire opened this issue 9 years ago • 1 comments

It doesn't look like oauth is being included.

(ns hello.core)
(defn -main
  []

  (require 'twitter
           '[oauth.client :as oauth])

  ;; Make a OAuth consumer
  (def oauth-consumer (oauth/make-consumer <key>
                                           <secret>
                                           "https://api.twitter.com/oauth/request_token"
                                           "https://api.twitter.com/oauth/access_token"
                                           "https://api.twitter.com/oauth/authorize"
                                           :hmac-sha1))

  (def oauth-access-token "1528170666-Ex4iQ0lz6b1KUWrbHWU9FoFtuP20lFpXMeZNRXY")
  (def oauth-access-token-secret "xzydqNtuvg2e2UXKe53YA0RZzJ20o4yZF8INIGswmRn9B")

  ;; Post to twitter
  (twitter/with-oauth oauth-consumer
                      oauth-access-token
                      oauth-access-token-secret
                      (twitter/update-status "posting from #clojure with #oauth")))

natesire avatar Aug 21 '16 21:08 natesire

Fixed it with

(ns hello.core) (require 'twitter '[oauth.client :as oauth])

But now it says

Unable to resolve symbol: in this context

natesire avatar Aug 22 '16 01:08 natesire