Unfortunately I keep getting this error:
{
"error": {
"message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration.",
"type": "OAuthException",
"code": 191
}
}
Login works however when my /etc/hosts
file is set to: 127.0.0.1 [mysite].rhcloud.com
, it only fails when I view the actual [mysite].rhcloud.com
.
I am running the exact same application (on a different server) locally as the one I'm running on rhcloud. Specifically the local<->remote web-application directories are synced.
When attempting login remotely the URL looks like this; and fails with aforementioned error:
https://graph.facebook.com/oauth/authorize?scope=user_photos%2Cfriends_photos&redirect_uri=http%3A%2F%2F[mypublicipaddress]%2Fuser%2Flogin&response_type=code&client_id=[hidden]
Whereas attempting to login locally the URL looks like this; and works:
https://www.facebook.com/dialog/permissions.request?app_id=[hidden]&display=page&next=http%3A%2F%2F[hidden].rhcloud.com%2Fuser%2Flogin&response_type=code&perms=user_photos%2Cfriends_photos&fbconnect=1
OK, you seem to be doing this right, but there's one thing that sometimes trips people up, do both your redirect_uri
and 'Website URL' field have a trailing '/'?
In particular, if the redirect_uri
doesn't have the trailing '/' (or a filename, etc) after the domain name it doesn't always work
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With