3

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 .

haile
  • 143
  • 1
  • 4
  • 12
  • http://stackoverflow.com/questions/3730032/http-error-405-method-not-allowed-error-in-admin-log, http://facebook.stackoverflow.com/search?q=appengine+405+Method+Not+Allowed – CBroe Nov 12 '12 at 15:34

2 Answers2

7

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.

Paul Collingwood
  • 8,978
  • 3
  • 20
  • 34
3

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.

haile
  • 143
  • 1
  • 4
  • 12