mattrepl / clojure-twitter

Clojure client for Twitter API

This URL has Read+Write access

name age message
file .gitignore Sun May 10 17:48:04 -0700 2009 Initial functionality. [Matt Revelle]
file LICENSE Sat Jul 18 21:51:53 -0700 2009 Added BSD license file. [Matt Revelle]
file README.markdown Sun Sep 06 22:21:23 -0700 2009 fixed name [Matt Revelle]
file build.xml Sun Sep 06 22:11:17 -0700 2009 run clean before running deploy task [Matt Revelle]
directory lib/ Sun Sep 06 22:21:33 -0700 2009 latest and greatest [Matt Revelle]
directory src/ Sun Sep 06 22:12:12 -0700 2009 URL encode parameters prior to assembling the b... [Matt Revelle]
README.markdown

Twitter client API for Clojure

Access the Twitter API from Clojure.

Building

ant -Dclojure.jar="..." -Dclojure.contrib.jar="..."

Example

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

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

(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 (http://github.com/mattrepl/clj-oauth) for an example.)
(def oauth-access-token-secret
     ;; The secret included with the access token)

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

;; Find out who follows dons
(twitter/followers-of-name "donsbot")

Authors

Development funded by LikeStream LLC (Don Jackson and Shirish Andhare), see http://www.likestream.org/opensource.

Designed and developed by Matt Revelle of Lightpost Software.