FBJS 流发布不工作

发布于 2024-12-01 01:57:57 字数 1196 浏览 3 评论 0原文

在我的应用程序中,我想在 facebook wall streemPublish 中发布一条短信,但它不起作用,任何人都可以告诉我我做错了什么,否则指导我一个很好的工作教程, 下面的代码也没有显示任何错误......

这是我的代码......

<body>
<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>

<script type="text/javascript">

function publish() {
 FB_RequireFeatures(["Connect"], function() {
   FB.Facebook.init('113700398662301', 'xd_receiver.htm');
                FB.ensureInit(function() {

                    var message = 'this is message';

                    var action_links = [{ 'text': 'Vote for Bill The Aircraft Carrier!', 'href': 'http://spayday.factor360.com/contest.html?page=viewInd&id=48082&contestId=2'}];
                    FB.Connect.streamPublish(message, action_links, null, "Share your support for Bill The Aircraft Carrier!", callback, false, null);
                });

    function callback(post_id, exception) {
        alert('Wall Post Complete');
    }

 });
}
</script>

</body>
<p>Stream Publish Test</p>
<a href="#" onclick="publish(); return false;">Post a story</a>

</html>

In my application I want post a text message in facebook wall streemPublish but it is not working, can anyone tell me what i did wrong else guide me a good working tutorial,
also the below code does not showing any error....

Here is my code ...

<body>
<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>

<script type="text/javascript">

function publish() {
 FB_RequireFeatures(["Connect"], function() {
   FB.Facebook.init('113700398662301', 'xd_receiver.htm');
                FB.ensureInit(function() {

                    var message = 'this is message';

                    var action_links = [{ 'text': 'Vote for Bill The Aircraft Carrier!', 'href': 'http://spayday.factor360.com/contest.html?page=viewInd&id=48082&contestId=2'}];
                    FB.Connect.streamPublish(message, action_links, null, "Share your support for Bill The Aircraft Carrier!", callback, false, null);
                });

    function callback(post_id, exception) {
        alert('Wall Post Complete');
    }

 });
}
</script>

</body>
<p>Stream Publish Test</p>
<a href="#" onclick="publish(); return false;">Post a story</a>

</html>

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

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

发布评论

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

评论(1

小…红帽 2024-12-08 01:57:57

该代码看起来有点过时。检查此内容以获取有关流发布的更新信息

https://developers.facebook.com/ docs/reference/javascript/FB.ui/

这用于设置您的 FB init。

https://developers.facebook.com/blog/post/525/

The code looks a little dated. Check this for updated info on stream publishing

https://developers.facebook.com/docs/reference/javascript/FB.ui/

and this for setting up your FB init.

https://developers.facebook.com/blog/post/525/

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