Troubleshooting Facebook's graph.put_object that returns error 400

Posted by TimLeung on Stack Overflow See other posts from Stack Overflow or by TimLeung
Published on 2010-12-27T22:32:50Z Indexed on 2010/12/28 6:54 UTC
Read the original article Hit count: 335

I am using Facebook Python's SDK along with Google App Engine, and making a call to do a checkin:

graph.put_object("me", "checkins", message="Hello, world", place="165039136840558", coordinates='{"latitude":"38.2454064", "longitude":"-122.0434404"}')

However, this throws an error 400 Bad Request and I don't seem to be able to try catch it so I can have the important information.

On a bad request, Facebook should return, an object like below which can help troubleshoot and address the issue, but I am not sure how I can retrieve this object:

{
   "error": {
    "type" : "OAuthException",
    "message" : "An active access token must be used to query information about the current user."
    }
   }

© Stack Overflow or respective owner

Related posts about python

Related posts about google-app-engine