Facebook 使用 Yii 框架进行 XFBML 调用失败

发布于 2024-08-29 20:14:43 字数 1280 浏览 2 评论 0原文

我在其他 IFRAME Facebook 应用程序中使用了相同的调用,但它在输出方面没有给我任何结果。我正在 Yii 上尝试,但一无所获。

<script type="text/javascript">

  window.onload = function() {

    FB_RequireFeatures(["XFBML"], function() {

      FB.init('xxxxxx', 'xd_receiver.htm');

      FB.XFBML.Host.get_areElementsReady().waitUnitlReady(function()
        {
          document.getElementById("container").style.visibility = "visible";
        });

    });

  };

</script>

<script type="text/javascript">

function publish() {
 FB_RequireFeatures(["Connect"], function() {
   FB.init('xxxxxx', 'xd_receiver.htm');
   FB.ensureInit(function() {
     FB.Connect.streamPublish();
   });
 });
}

</script>

<fb:serverFbml style="width: 755px;">
 <script type="text/fbml">
  <fb:fbml>
   <fb:request-form
      action="http://apps.facebook.com/ixxxx"
      method="POST"
      invite="true"
      type="rrrrr"
      content="rrrrr <?php echo htmlentities("<fb:req-choice url=\"http://apps.facebook.com/XXXX\" label=\"Authorize My Application\"") ?>" > 
<fb:multi-friend-selector showborder="false" actiontext="Invite your friends to use SuperThief."> 

   </fb:request-form>
  </fb:fbml>
 </script>
</fb:serverFbml>

I have used this same call in other IFRAME Facebook apps, but it gives me nothing at all in terms of output. I am trying it on Yii and getting nothing.

<script type="text/javascript">

  window.onload = function() {

    FB_RequireFeatures(["XFBML"], function() {

      FB.init('xxxxxx', 'xd_receiver.htm');

      FB.XFBML.Host.get_areElementsReady().waitUnitlReady(function()
        {
          document.getElementById("container").style.visibility = "visible";
        });

    });

  };

</script>

<script type="text/javascript">

function publish() {
 FB_RequireFeatures(["Connect"], function() {
   FB.init('xxxxxx', 'xd_receiver.htm');
   FB.ensureInit(function() {
     FB.Connect.streamPublish();
   });
 });
}

</script>

<fb:serverFbml style="width: 755px;">
 <script type="text/fbml">
  <fb:fbml>
   <fb:request-form
      action="http://apps.facebook.com/ixxxx"
      method="POST"
      invite="true"
      type="rrrrr"
      content="rrrrr <?php echo htmlentities("<fb:req-choice url=\"http://apps.facebook.com/XXXX\" label=\"Authorize My Application\"") ?>" > 
<fb:multi-friend-selector showborder="false" actiontext="Invite your friends to use SuperThief."> 

   </fb:request-form>
  </fb:fbml>
 </script>
</fb:serverFbml>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

碍人泪离人颜 2024-09-05 20:14:43

检查您的新 Yii 站点是否针对 Facebook 进行了正确设置可能会有所帮助。您可能没有在布局文件中包含正确的 JavaScript 库,或者您可能忘记将正确的 xmlns 属性添加到标记中。要重温这些内容,请访问此处的 Facebook 文档:
http://wiki.developers.facebook.com/index.php/Connect/设置您的网站

It might be helpful to check that you have your new Yii site setup correctly for Facebook. You might not be including the right JavaScript libraries in the layout file's , or you may have forgotten to add the right xmlns attribute to the tag. For a refresher on this stuff head over to the Facebook documentation here:
http://wiki.developers.facebook.com/index.php/Connect/Setting_Up_Your_Site

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文