From dr.mobeus at googlemail.com Mon Jan 4 11:16:22 2010 From: dr.mobeus at googlemail.com (Dean Swinfield) Date: Mon, 4 Jan 2010 11:16:22 +0000 Subject: [cl-facebook-devel] Fwd: JSON error on response In-Reply-To: <7b3537c01001040312v213e30d7w9263512e148614da@mail.gmail.com> References: <7b3537c01001040312v213e30d7w9263512e148614da@mail.gmail.com> Message-ID: <7b3537c01001040316h1bfd30a1yd569e3581bc2c7e1@mail.gmail.com> Hello, Firstly, I should point out that I'm a Lisp newbie, so I could be doing something silly, but when I try the example for cl-facebook, I get an error, and could do with some guidance.. This is what I type it (I'm using SBCL via emacs and SLIME): CL-USER> (setq *secret* "bec63f898bd92e1ee185ef6335dbbb10") CL-USER> (setq *api-key* "cc5ec811854818562c9a0362b13657d9") CL-USER> (setq *auth-id* (cl-facebook:facebook-auth-id *api-key* *secret*)) (obviously, the key and secret values are pseudo, but I'm showing how they were entered) After hitting return on the third line, I get this debug trace.. Invalid JSON literal name: Not [in #] [Condition of type JSON:JSON-SYNTAX-ERROR] Restarts: 0: [ABORT] Return to SLIME's top level. 1: [TERMINATE-THREAD] Terminate this thread (#) Backtrace: 0: (JSON:JSON-SYNTAX-ERROR # "Invalid JSON literal name: ~A")[:EXTEND] 1: (JSON:DECODE-JSON #) 2: ((LAMBDA ())) 3: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SETQ *AUTH-ID* (CL-FACEBOOK:FACEBOOK-AUTH-ID *API-KEY* *SECRET*)) # From mnovenstern at students.colgate.edu Fri Jan 15 08:14:30 2010 From: mnovenstern at students.colgate.edu (Matt Novenstern) Date: Fri, 15 Jan 2010 17:14:30 +0900 Subject: [cl-facebook-devel] Fwd: JSON error on response In-Reply-To: <7b3537c01001040316h1bfd30a1yd569e3581bc2c7e1@mail.gmail.com> References: <7b3537c01001040312v213e30d7w9263512e148614da@mail.gmail.com> <7b3537c01001040316h1bfd30a1yd569e3581bc2c7e1@mail.gmail.com> Message-ID: <1263543270.32036.5.camel@clam> On Mon, 2010-01-04 at 11:16 +0000, Dean Swinfield wrote: > > > Hello, > Firstly, I should point out that I'm a Lisp newbie, so I could be > doing something silly, but when I try the example for cl-facebook, I > get an error, and could do with some guidance.. > > This is what I type it (I'm using SBCL via emacs and SLIME): > > > CL-USER> (setq *secret* "bec63f898bd92e1ee185ef6335dbbb10") > CL-USER> (setq *api-key* "cc5ec811854818562c9a0362b13657d9") > CL-USER> (setq *auth-id* (cl-facebook:facebook-auth-id *api-key* > *secret*)) > > > (obviously, the key and secret values are pseudo, but I'm showing how > they were entered) > > > After hitting return on the third line, I get this debug trace.. > > > Invalid JSON literal name: Not [in # socket" {B18E169}>] > [Condition of type JSON:JSON-SYNTAX-ERROR] > > > Restarts: > 0: [ABORT] Return to SLIME's top level. > 1: [TERMINATE-THREAD] Terminate this thread (# RUNNING {B81AF49}>) > > > Backtrace: > 0: (JSON:JSON-SYNTAX-ERROR # socket" {B18E169}> "Invalid JSON literal name: ~A")[:EXTEND] > 1: (JSON:DECODE-JSON #) > 2: ((LAMBDA ())) > 3: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SETQ *AUTH-ID* > (CL-FACEBOOK:FACEBOOK-AUTH-ID *API-KEY* *SECRET*)) # --more-- > > > The rest of the trace is the usual SLIME stuff. Anyway, anyone have > thoughts on what I'm doing wrong? Or suggest some routes for > exploration? > > PS. > Can i just point out that I've had issues trying to post to this mail > group, as I suspect it treats gmail.com and googlemail.com as separate > domains (whereas gmail doesn't). > > Thanks > > > Dean. I went to look at the code and see if I got your problem, and it seems it's been a while since I used cl-facebook, and cl-trivial-https seems a bit hard to come by. I started porting it to drakma to be a bit more current, and I haven't finished that yet, so I haven't had a chance to reproduce your problem. I'm also a lisp newbie, but, I'd try and get at that stream it's talking about and see what's in it. cl-facebook is set up to read JSON-formatted output from the facebook REST api, which sends the more complicated XML by default. If it's JSON, it should be something like this: { [ "status" : "ok" ], ["property" : "value" ] } while XML looks more like this: value In any event, try and make sure you're getting JSON data back from the server. I will try and hack my system back into working order soon. -Matt -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part URL: