[英]JS SDK from Facebook stop working with this error in the console
我用android studio完成了一个webview项目,该Webview项目加载了一个网站...突然从Facebook登录按钮停止工作,并且控制台中出现此错误时,一切正常
登录脚本:
function statusChangeCallback(response) {
console.log('1');
if (response.status === 'connected') {
// Logged into your app and Facebook.
testAPI();
} else {
}
}
function checkLoginState() {
console.log('2');
FB.getLoginStatus(function(response) {
statusChangeCallback(response);
});
}
window.fbAsyncInit = function() {
console.log('3');
FB.init({
appId : '00000',
cookie : true, // enable cookies to allow the server to access
// the session
xfbml : true, // parse social plugins on this page
version : 'v3.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 = "https://connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
function testAPI() {
FB.api('/me?fields=email,name,first_name,last_name,gender',
function(response) {
$.ajax({
url: "loginSave.php",
type: "post",
data: {id:response.id,
email:response.email,
name1:response.name,
name2:'',
gender:response.gender} ,
success: function (response) {
window.location.href = 'principal.php';
},
error: function(jqXHR, textStatus, errorThrown) {
// console.log(textStatus, errorThrown);
}
});
});
}
她的图书馆出现Facebook错误吗?我还缺少什么吗?
根据该报告的评论,最近有一个有关此问题的错误报告, https://developers.facebook.com/support/bugs/378853882892232/-但该问题似乎已经解决。
如果您仍然遇到此问题,请提交一份新报告(并可能提及其中的现有报告-该报告已经关闭,因此如果您对此发表评论,则可能会被忽略。)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.