3
votes

I'm doing an app on appengine and it works just fine there .I have the app's URL on facebook canvas url http://xx.appspot.com/yyy/ (with trailing slash) and when the app is called from http://apps.facebook.com/appname i get

405 Method Not Allowed The method POST is not allowed for this resource.

class MainHandler(webapp2.RequestHandler): def get(self): #do stuff here def post(self): pass

app = webapp2.WSGIApplication([ ('/yyy/', MainHandler), ('/',anotherHandler),

], debug=True )

note : no such error in appengine log .

2

2 Answers

7
votes

It's trying to make a POST to your app but you do not have a handler configured to receive it.

Where you have your GET handler:

 def get(self):
     dostuff

you also need to have a POST hander as well:

def post(self):
    dostuff

From what I remember when I last looked at this, it's probably trying to complete a step in the authorisation process or send you some data.

3
votes

Good Day !

It seems like I FINALLY figured out what my problem was . I defined the post method in the application as Paul C(which is correct) has mentioned but I was still getting the same 405 error message . The reason was ,I didn't update the default version of the app that was running from the appengine dashboard & updated my app version.

please make sure which version of the app you are using if you have the same problem. https://appengine.google.com/deployment?app_id=s~APP_ID&version_id=default:

I hope no one goes through this same experience I did. Thanks all.