English 中文(简体)
How do i redirect to a GET request from a POST request on GAE
原标题:

i am writing an FBML app on facebook hosted in GAE. Facebook will talk to your hosted app only vai POST (im sure this is the cause, but please do correct me if i m wrong). So im faced with the issue that inside of my POST method, i need to redirect to facebook OAuth authroize URL. But i can only send a GET request. How can i do that? At the moment i m doing

class OauthHandler(webapp.RequestHandler):
  def post(self):
    # blablablab
    request.redirect(oauth_uri)

Which is wrong since the oauth_uri is only responding to GET. Further more, OAuth will redirect back to my redirect handler through GET, but i cant! i can only do post. So i m confused.

ideas?

Thanks in advance

问题回答

"Further more, OAuth will redirect back to my redirect handler through GET, but i cant! i can only do post. So i m confused."

Is there a reason you can t add this to your handler? def get(self): self.post()

It s what we ve been doing for all our handlers.





相关问题
How to make logging.debug work on Appengine?

I m having a tough time getting the logging on Appengine working. the statement import logging is flagged as an unrecognized import in my PyDev Appengine project. I suspected that this was just an ...

gqlQuery returns object, want list of keys

Is there a way to convert the GqlQuery object to an array of keys, or is there a way to force the query to return an array of keys? For example: items = db.GqlQuery("SELECT __key__ FROM Items") ...

Integrating Google AppEngine with a Thick Client

I want to make a multi-user client-server solution with Java Swing thick client as a front-end and Google AppEngine (Java one) as a back-end. The problem is that GAE provides only web-based forms for ...

sorl.thumbnail : thumbnail is not a valid tag library?

I am trying to install sorl.thumbnail but am getting the following error message: thumbnail is not a valid tag library: Could not load template library from django.templatetags.thumbnail, No module ...

热门标签