Clojure OAuth & Flickr -
iam following these steps https://secure.flickr.com/services/api/auth.oauth.html implement oauth in clojure prog.
everything working fine step 3 following code. (printlns checking return values)
(def consumer-key "0000") (def consumer-secret "0000") (def consumer (oauth.client/make-consumer consumer-key consumer-secret "http://www.flickr.com/services/oauth/request_token" "http://www.flickr.com/services/oauth/access_token" "http://www.flickr.com/services/oauth/authorize" :hmac-sha1)) (def request-token (oauth/request-token consumer "http://localhost:8080/authorize")) (defn flickrauth [] (def auth-url (oauth/user-approval-uri consumer (:oauth_token request-token))) (println (str auth-url "&perms=write")))
after typing auth-url my browser can authorize access write permissions.
(defn get-access-token [oauth-token verifier] (println "consumer: " consumer "req token: " oauth-token "verifier: " verifier)
in following code got "oauth_problem=token_rejected, status 401". guess there problem exchanging request token access token...
(def access-token-response (oauth/access-token consumer request-token verifier)) (println "access token response: " access-token-response)
short summary... request token , verifier, in access-token-response oauth_token used..and don't know why.
thanks , hint!
Comments
Post a Comment