Facebook authentication redirect_uri is not an absolute URI

I would like to use client-side authentication on facebook without the JS SDK to avoid pop-ups. I try many different difference codes, but nothing works for many hours, please help.

here is my code

FB.init({ appId : appId, status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml : false, // parse XFBML channel : 'http://fb.spot-the-differences.com/index.php', oauth : true }); FB.getLoginStatus(function(response) { if (response.status == 'connected') { ... } else if (response.status === 'not_authorized') { top.location = "https://www.facebook.com/dialog/oauth?client_id=" + appId + "&redirect_uri='" + encodeURIComponent('http://fb.spot-the-differences.com') + "'&scope=read_friendlists,publish_actions,publish_stream,email&esponse_type=token"; }); 

I'm trying to add /index.php, change the url to ip address, try a lot of codes, but it will always be an error

 API Error Code: 191 API Error Description: The specified URL is not owned by the application Error Message: redirect_uri isn't an absolute URI. Check RFC 3986. 

Basic Facebook settings

 Site URL: http://fb.spot-the-differences.com/ Canvas Page: http://apps.facebook.com/spot-the-differences Canvas URL: http://fb.spot-the-differences.com/ Secure Canvas URL: https://fb.spot-the-differences.com/ 
+1
source share
1 answer
 appId + "&redirect_uri='" + encodeURIComponent('http://fb.spot-the-differences.com') + "'&scope=…"; 

This will result in something like &redirect_uri='http… inside the final url.

' , of course, nonsense - delete it!

+2
source

All Articles