Question

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?

Was it helpful?

Solution

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!

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top