不使用onClick方法将iframe添加到Facebook粉丝页面

时间:2010-08-24 22:21:39

标签: facebook fbjs xfbml facebook-iframe

有没有办法在不必执行onClick功能的情况下将iframe添加到Facebook页面?

现在我正在使用此代码并且工作正常,除非您必须单击链接才能显示iframe?

<!-- Start iframe CODE -->
        Like me to show the iFrame link!

        <fb:visible-to-connection>
            <a onClick="outside_location.setInnerFBML(link_1);" style="cursor: pointer;">Click here to show the iFrame!</a>
        </fb:visible-to-connection> 
        <div id="outside_location"></div>
        <fb:js-string var="link_1">
        <fb:iframe height="500" allowTransparency="true" frameborder="0" scrolling="no" style="width:100%; height: 1400px; border:none"     src="http://apps.ignitesocialmedia.com/php/facebook/sandbox/tabs/iframe.php"></fb:iframe>
        </fb:js-string>
        <script type="text/javascript" charset="utf-8">
        var outside_location = document.getElementById('outside_location');
        </script>

        <!-- End iframe CODE -->

好像这已经在几个地方完成了,但我无法弄明白。