用户共享链接后显示隐藏的下载框 [英] Show hidden download box after user shares a link

查看:74
本文介绍了用户共享链接后显示隐藏的下载框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在访问者共享链接后,我试图使隐藏的下载框div出现.我在这里尝试了

I am trying to make a hidden download box div appear after a visitor shares a link.I've tried here something http://jsfiddle.net/trefu/qNDJB/4/ but is not working. I don't know how to define FB so it can be called. Can someone help me?

 <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);
  }

推荐答案

有关wowvi.blogspot.ro的信息:

on having a look at 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>";

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

You are using single quotes inside single quotes..

这篇关于用户共享链接后显示隐藏的下载框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆