2

我有几个 facebook 按钮,它们显示为纯文本。我不知道为什么。它突然发生了,我没有更改代码。所有浏览器都将其显示为纯文本。我的代码是:

 <div id="fb-root"></div>
  <script>
  window.fbAsyncInit = function() {
    // init the FB JS SDK
    FB.init({
      appId      : '<?php echo AppInfo::appID(); ?>',                        // App ID from the app dashboard
      channelUrl : '//<?php echo $_SERVER["HTTP_HOST"]; ?>/channel.html', // Channel file for x-domain comms
      status     : true,                                 // Check Facebook Login status
      xfbml      : true                                  // Look for social plugins on the page
    });

    // Additional initialization code such as adding Event Listeners goes here
  };

  // 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_GB/all.js#xfbml=1&appId=MY_APP_ID";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));


 </script>
    <ul>
      <li><fb:login-button scope="user_map" id="get_map" onclick="self.location=http://localhost:8080/savefunctions.php?runFunction=getLikes">Get Map</fb:login-button></li>
      <li><fb:login-button scope="user_groups" id="get_acc" onclick="self.location=http://localhost:8080/savefunctions.php?runFunction=getLikes">Get your account info</fb:login-button>
        <div class="fb-login-button" data-show-faces="true" data-width="200" data-max-rows="1">Gica</div></li>
      <li><fb:login-button scope="user_apps" id="like_acc" onclick="self.location=http://localhost:8080/savefunctions.php?runFunction=getLikes">Get apps</fb:login-button></li>
      <li><fb:login-button scope="user_groups" id="get_all"  onclick="http://localhost:8080/savefunctions.php?runFunction=getLikes">Get All</fb:login-button></li>
    </ul>

请忽略onClick.
请注意,我同时尝试了<fb:login-button><div class="fb-login-button">。它们都显示为纯文本。

4

0 回答 0