I got this error in the Chrome's console when using Javascript SDK to implement the Facebook login:
Given URL is not allowed by the Application configuration: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.
I tried to call the FB.getLoginStatus function and then the error happend. I already researched Question 1 and Questions 2 and followed instructions and still cannot resolve this error.
The url of the page which calling the function is: http://channels.daily.sg.tripolis.vn/channels#/new/add_channel_a (I'm using AngularJS)
This is my App's setting: https://drive.google.com/file/d/0Bya9VnleW-F-TUhWRUZhX3Rxb2M/view?usp=sharing
and this is my AngularJS code to setup the SDK:
this.tokyo = angular.module('tokyo');
this.tokyo.run(['$rootScope', '$window',
function($rootScope, $window) {
$window.fbAsyncInit = function() {
// Executed when the SDK is loaded
FB.init({
appId: '570857916302626',
cookie: true, // enable cookies to allow the server to access
xfbml: true,
version: 'v2.4' // use version 2.2
});
};
// Load the SDK asynchronously
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
// Here we run a very simple test of the Graph API after login is
// successful. See statusChangeCallback() for when this call is made.
}]);
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script>
What did I do wrong ?