maxweber / clj-facebook-graph

A client for the Facebook Graph API based on clj-http and Ring
http://clojars.org/clj-facebook-graph
72 stars 28 forks source link

[Thrown class java.net.URISyntaxException] #3

Closed adinapoli closed 13 years ago

adinapoli commented 13 years ago

Hi Max, I never had problems with your library before. Now when I try to fetch even the dumbest resource through your library I get:

Illegal character in query at index 58: https://graph.facebook.com/me/home?access_token=2227470867|2.cqLAKgq7wjHa3651huwZGg__.3600.1304877600.0-1712326620|kvvuu-IU1IAjIpG-XBT4pxUE6GE&limit=25&until=1304861820 [Thrown class java.net.URISyntaxException]

I don't know if it is due to the particular access token or somewhat, but I've never experienced nothing like this before, neither with 0.1.0 nor with the most recent version, 0.2.0.

I am using compojure and ring as well in order to build a simple webapp, may be this that may cause conflict (because I know that clj-facebook-graph uses ring as well).

Bye, Alfredo

adinapoli commented 13 years ago

Ok, I solved simply encoding my access token like so:

(def auth-token (url-encode "2227470867|2.cqLAKgq7wjHa3651huwZGg__.3600.1304877600.0-1712326620|kvvuu-IU1IAjIpG-XBT4pxUE6GE"))

with url-encode taken from ring.util.code. I don't know if it can be useful :) Bye, Alfredo