Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty authorization page #243

Open
ludovicchabant opened this issue Oct 2, 2023 · 1 comment
Open

Empty authorization page #243

ludovicchabant opened this issue Oct 2, 2023 · 1 comment

Comments

@ludovicchabant
Copy link

Hello,

I'm trying to get some access tokens for an app that would access and manage a Facebook page, but I can't seem to get anywhere. The flow goes a bit like this:

perms = ['page_show_list', 'page_manage_posts']
return_url = 'https://mydomain.com/blah'
auth_client = GraphAPI(app_id, app_secret, oauth_flow=True)
login_url, state = auth_client.get_authorization_url(return_url, perms)

This generates a login URL like:

https://www.facebook.com/dialog/oauth?response_type=code&client_id=<ID>&redirect_uri=<RETURN_URL>&scope=pages_show_list+pages_manage_posts&state=PyFacebook

That leads to a page that is simply blank. My return URL doesn't seem to get accessed according to the server logs. That URL is of course added to the allowed app domains in my app's Meta dashboard. What's wrong?

@DilanTsasi
Copy link

Adding your URL to allowed domains is not enough, ensure that you have added it to valid OAuth redirect URLs in Client OAuth settings:
https://developers.facebook.com/docs/facebook-login/guides/advanced/manual-flow/#login

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants