Pergunta

I am writing an app using flask. I am using the RAuth module for OAuth. The url encoded access token that facebook is returning is formatted like www.myurl.com/authCallback#access_token=<token>.

I tried getting the raw string of the url using 'request.url', but that only returns www.myurl.com/authCallback

I also tried using a decoration of @app.route('/authCallback/<access_token>') which gives me a 404.

Is there a way to do this. Has anyone used these to libraries together before?

Foi útil?

Solução

Why not take a look at the Flask example? Here's the callback view that handles parsing the code out of the URL.

I would recommend following that example if you can. Hope that helps!

Outras dicas

Take a look at Flask-rauth extension. May be it can give you some ideas ?

https://github.com/joelverhagen/flask-rauth

It has an examples section as well which includes facebook

https://github.com/joelverhagen/flask-rauth/blob/master/example/facebook.py

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top