我已经设置了一个由 Jquery 触发的共享弹出窗口。它有效,但我想使用响应值在成功时触发 AJAX 调用,而 Facebook 仅返回一个空数组。
这是javascript
$("#fb-request").click(function () { FB.ui({ method: 'share', name: 'Check out website', href: 'URL_TO_SHARE', }, function (response) { if (response && !response.error_code) { console.log(response); // Returns: [] } }); });
因此,我无法区分发帖者和使用取消按钮的人。我在这里错过了什么吗? 或者是否需要在 Facebook 应用程序上进行设置?
谢谢,
最佳答案
来自 documentation :
Response Data
Parameter Description object_id Only available if the user is logged into your app using Facebook and has granted publish_actions. If present, this is the ID of the published Open Graph story.
关于facebook - 为什么 FB.UI Share 响应不返回任何内容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26142144/