facebook 如何问题?
<fb:visible-to-connection>
<img src="http://www.xxx.com/images/welcome1.jpg" border="0" alt="Welcome to ">
<fb:else>
<div style="top: 0; position: absolute;">
<img src="http://www.xxx.com/images/like_us1.jpg" />
</div>
</fb:else>
</fb:visible-to-connection>
如果我在 facebook FBML 选项卡应用程序中使用此代码,则它可以正常工作。
但我有另一个使用 iframe 的应用程序,我正在从我的网站加载一个简单的页面。我试图将我的 html/php 代码与 fbml 代码放在一起,但没有成功:
<html>
<dody>
<fb:visible-to-connection>
..........html and php code here........
<fb:else>
<div style="top: 0; position: absolute;">
<img src="http://www.xxx.com/images/like_us1.jpg" />
</div>
</fb:else>
</fb:visible-to-connection>
</body>
</html>
类似这样的东西,但它不会真正工作,
有什么建议吗? 谢谢
<fb:visible-to-connection>
<img src="http://www.xxx.com/images/welcome1.jpg" border="0" alt="Welcome to ">
<fb:else>
<div style="top: 0; position: absolute;">
<img src="http://www.xxx.com/images/like_us1.jpg" />
</div>
</fb:else>
</fb:visible-to-connection>
this code works fine if i use it inside facebook FBML tab app.
but i have another app that uses iframes and i'm loading a simple page from my website. Im trying to put my html/php code together with the fbml one but with no success:
<html>
<dody>
<fb:visible-to-connection>
..........html and php code here........
<fb:else>
<div style="top: 0; position: absolute;">
<img src="http://www.xxx.com/images/like_us1.jpg" />
</div>
</fb:else>
</fb:visible-to-connection>
</body>
</html>
something like this, but it wont really work,
any suggestions?
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这篇文章有您正在寻找的内容。对于 iframe 页面,您必须使用服务器代码来执行此操作,因为 Facebook 会将帖子变量发送到您的页面,其中包含有关用户的匿名信息,包括他们的语言以及他们是否是粉丝。一旦他们喜欢该页面,页面就会刷新,您将通过相同的帖子变量信息知道他们是粉丝。
此外,FBML 选项卡已被弃用,如果您有时间,在 Facebook 杀死它们之前,您将希望将它们转换为 iframe。
This article has what you are looking for. With iframe pages, you have to do this with server code as Facebook will send post variables to your page with anonymous info about the user including their language and whether they are a fan or not. Once they like the page, the page will refresh and you will know that they are a fan via the same post variable information.
Also, the FBML tabs are deprecated and you will want to convert them over to iframes when you have the time before Facebook kills them.