简体   繁体   中英

facebook api login weird issue

So I have this very weird issue with facebook log in (so he can upload facebook photos), it works great with my account, on any pc, even incognito. but when anyone else tries to log in it says "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 also have a share button, that requires log in, and that works for everyone. no errors for sharing. Valid OAuth redirect URIs i set this to my website url. the code is:

$('#getFbImg').click(function () {
    FB.getLoginStatus(function(response) {
        if (response.status === 'connected') {
            var uid = response.authResponse.userID;
            var accessToken = response.authResponse.accessToken;
            getPermissions();
            getUserAlbums();
            getUserUploads();
        } 
        else if (response.status === 'not_authorized') {
            // the user is logged in to Facebook, 
            // but has not authenticated your app
        } 
        else {
            // the user isn't logged in to Facebook.
            FB.login(function(response) {
                if (response.authResponse) {
                    var uid = response.authResponse.userID;
                    var accessToken = response.authResponse.accessToken;
                    getPermissions();
                    getUserAlbums();
                    getUserUploads();
                } else {
                    console.log('User cancelled login or did not fully authorize.');
                }
            }, {scope: 'public_profile,user_photos,user_likes'});
        }
    });
});

How come only I can use it and everyone else gets the 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. error

可能您在应用程序设置中提供的URL地址不同于在脚本中使用的URL地址。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM