Feed对话框(FBUI)Facebook UI不起作用 [英] Feed Dialog (FBUI) Facebook UI is not working

查看:113
本文介绍了Feed对话框(FBUI)Facebook UI不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一段时间以来,我一直在使用我的网站上的facebook feed对话框,但是有一天它突然停止了工作. Facebook支持说一切正常.从我尝试过的每台机器上来看,显然没有.如果您已登录并获得了应用程序的权限,则单击链接后,该对话框将不再弹出.

I've been using the facebook feed dialog on my website for a while but one day it suddenly stopped working. Facebook support says everything works. From every machine I've tried, it clearly doesn't. If you are logged in and have given the app permission, then the dialog does not pop up anymore when you click on the link.

对话框弹出后,您可以尝试发布一些内容吗?第一次应该工作.然后尝试刷新页面(甚至重新启动浏览器,确保您已登录Facebook)并尝试再次发布.第二次可以正常工作吗? /edit

edit: Once the dialog pops up, could you try posting something? The first time should work. Then try to refresh the page (or even restart the browser, make sure you're logged into facebook) and try to post again. Does it work the 2nd time around? /edit

您可以在此处直接尝试: Clicky

You can try it directly here: Clicky

我试图直接从Facebook文档中复制示例代码,但它仍然对我不起作用.这是来自Facebook的示例代码:

I've tried to copy the sample code from the facebook documentation directly and it still doesn't work for me. Here's the sample code from facebook:

    <div id='fb-root'></div>
<script src='http://connect.facebook.net/en_US/all.js'></script>
<p><a onclick='postToFeed(); return false;'>Post to Feed</a></p>
<p id='msg'></p>

<script> 
  FB.init({appId: "YOUR_APP_ID", 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) {
      document.getElementById('msg').innerHTML = "Post ID: " + response['post_id'];
    }

    FB.ui(obj, callback);
  }

</script>

这是我的代码:

    <div id='fb-root'></div>
<script src='http://connect.facebook.net/en_US/all.js'></script>
<p><a onclick='postToFeed(); return false;'>Post to Feed</a></p>
<p id='msg'></p>

<script> 
  FB.init({appId: "185521851465588", 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) {
      document.getElementById('msg').innerHTML = "Post ID: " + response['post_id'];
    }

    FB.ui(obj, callback);
  }

</script>

任何帮助将不胜感激!

更新: 我想我发现了一些东西:如果您先访问此页面,然后点击发布结果,接受权限并返回测试页面此处,然后出现对话框再次停止工作.

Update: I think I found something: if you go to this page first and hit "Post your results", accept the permissions and go back to the test page here, then the dialog stops working again.

推荐答案

如果您已登录并获得了应用程序权限,则单击链接后该对话框将不再弹出.

If you are logged in and have given the app permission, then the dialog does not pop up anymore when you click on the link.

我在哪里授予您的应用权限?在您提供的页面上,我没有任何要求.当我单击您的链接时,它只会打开供稿对话框.

Where do I give your app permissions? I’m not asked for any on the page you provided. It just opens the feed dialog when I click on your link.

如果要重现此问题(授予您的应用程序权限)有其他必要,请提供有关如何解决此问题的更多信息.

If something else is necessary to reproduce the problem (giving your app permissions), please provide more info on how to get there.

这篇关于Feed对话框(FBUI)Facebook UI不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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