Skip to content

Debugging Web Services

by lacqui on May 30th, 2010

As previously mentioned, I’m doing some coding for clients, something I haven’t done in some time.  One of the projects works with the Facebook API.  Specifically, it allows users to set their status through another website.

However, hunting through the docs was painful.  The official docs aren’t organized in a logical way (I had to rely heavily on example code, rather than proper API documentation).  Then, there’s the errors.

You see, unlike a local library, there is no debug version of the FB API.  This means that, if I’m having issues, all I can do is plug in a parameter and rely on the error code to tell me what I’m doing wrong.  This doesn’t help AT ALL if the error message I get back is:

{“error”:{“type”:”Exception”,”message”:”(#1) An unknown error occurred”}}

Not very helpful.

Eventually, I figured it out, but couldn’t find any documentation (or even a blog post) on it.  Facebook only allows Unix-style EOL characters (LF), not DOS-style (CR LF).  Not fun to debug :(

Share

From → Computers