簡體   English   中英

來自Facebook的JS SDK停止在控制台中處理此錯誤

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM