Invalid redirect_uri: This URL is not allowed by application configuration

My code: https://graph.facebook.com/oauth/authorize?client_id=174375686054021&redirect_uri=http://centshark.com/app/fblogin.aspx&scope=offline_access,publish_stream

Website with Facebook Login: http://centshark.com

Eror: {"error": {"message": "Invalid redirect_uri: this URL is not allowed by the application configuration.", "Type": "OAuthException", "code": 191}}

+4
source share
4 answers

on the facebook application page, go to the main tab. find the option "Website with Facebook".

you will find the website URL: enter the full URL here (e.g. http://Mywebsite.com/MyLogin.aspx ). this is a url that you can use with a call, for example, if the APP id is 123456789

https://graph.facebook.com/oauth/authorize?client_id=123456789&redirect_uri=http://Mywebsite/MyLogin.aspx&scope=publish_actions

+10
source

I managed to fix the problem in the “BASIC Tab” section using “Add Platform” and “Website” using the standard website URL http: //.

and

Go to the ADVANCED tab and in the "Security" section by placing the website URL in the "Valid OAuth Redirect URI Fields" field.

+2
source

if you use php php sdk ...

the script callback needs to be changed

$accessToken = $helper->getAccessToken(); 

to

 $accessToken = $helper->getAccessToken('https://example.com/fb-callback.php'); 

where ' https://example.com/fb-callback.php ' is the URI for your script callback

and add this URI to “OAuth Valid URIs” in “Application Configuration” on Facebook-> My Applications-> Settings-> Advanced

+2
source

03/12/2013: now you need to go to the transfer for settings and click on the "create an application" drop-down menu, use facebook as you yourself (if you haven’t already done so), and then edit or create the application you need the correct URL.

0
source

Source: https://habr.com/ru/post/1479714/


All Articles