0

我正在尝试在访问者共享链接后显示隐藏的下载框 div。我在这里尝试了一些http://jsfiddle.net/trefu/qNDJB/4/但不起作用。我不知道如何定义 FB 所以可以调用它。有人能帮我吗?

 <div id='fb-root'></div>

<div id="download_box" style="display: none;">
    Download Box (whatever that means) goes here
</div>

  FB.init({appId: "437410746335629", status: true, cookie: true});

  function postToFeed() {

    // calling the API ...
    var obj = {
      method: 'feed',
      link: 'https://developers.facebook.com/docs/reference/dialogs/',
      picture: 'http://fbrell.com/f8.jpg',
      name: 'Facebook Dialogs',
      caption: 'Reference Documentation',
      description: 'Using Dialogs to interact with users.'
    };

  function callback(response) {
    if (response && response.post_id) {
        document.getElementById('download_box').style.display = 'block';
    } else {
        alert('You must share your post before you can download.');
    }
}

    FB.ui(obj, callback);
  }
4

1 回答 1

0

看看 wowvi.blogspot.ro:

var cc = '<iframe allowfullscreen='true' frameborder='0' height='410' src='embed.php?id=http://www.youtube.com/watch?v=Zcg8xscHkXM' width='640'></iframe>';

将此更改为

var cc = "<iframe allowfullscreen='true' frameborder='0' height='410' src='embed.php?id=http://www.youtube.com/watch?v=Zcg8xscHkXM' width='640'></iframe>";

您在单引号内使用单引号..

于 2013-03-22T17:18:07.047 回答