Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (32 sloc) 1.78 KB

Twitter client API for Clojure

Access the Twitter API from Clojure.


lein deps
lein jar


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

;; Make a OAuth consumer
(def oauth-consumer (oauth/make-consumer <key>

(def oauth-access-token 
     ;; Look up an access token you've stored away after the user
     ;; authorized a request token and you traded it in for an
     ;; access token.  See clj-oauth ( for an example.)
(def oauth-access-token-secret
     ;; The secret included with the access token)
;; Print the Twitter stream to system outas it is recieved - this is the callback function
(defn write-out [data] (println data))

;; Post to twitter.streaming
(twitter.streaming/with-oauth oauth-consumer 
                    (twitter.streaming/statuses-filter write-out :track "basketball,football,baseball,footy,soccer"))


Development funded by LikeStream LLC (Don Jackson and Shirish Andhare), see

Designed and developed by Matt Revelle of Lightpost Software.

Twitter Streaming API methods added by a sleepy samurai.