在Facebook连接流出版 [英] Stream publishing in Facebook Connect

查看:177
本文介绍了在Facebook连接流出版的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想发布一个外部的Facebook连接的网站上的数据流。

I would like to publish streams on an external Facebook Connect website.

这应通过它我已经包含JavaScript客户端库来完成。

This should be done via the JavaScript client library which I've already included.

我的网页code是如下:

The code of my page is as follows:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xml:lang="de" lang="de">
<head>
[...]
</head>
<body>
[...]
<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/de_DE" type="text/javascript"></script>
<script type="text/javascript">
FB.init("XYZ", "xd_receiver.htm");
FB.Connect.ifUserConnected(set_cookies_and_refresh());
</script>
[...]
<script type="text/javascript">
var addedLinks = [{ "text": "Challenge XYZ now", "href": "http://example.org/page1.html" }];
FB.Connect.streamPublish("", null, addedLinks, null, "What do you want to add?");
</script>
[...]
</body>
</html>

流对话应该尽快在页面加载打开。

The stream dialogue should be opened as soon as the page is loaded.

有什么不对?你可以帮我吗?非常感谢你!

What's wrong? Can you help me? Thank you very much!

推荐答案

您需要<一个href=\"http://wiki.developers.facebook.com/index.php/Initializing_and_Loading_Facebook_Connect_Features\"相对=nofollow>确保连接库已在尝试使用它之前加载。

FB.ensureInit(function() {
  // do something here
});

这篇关于在Facebook连接流出版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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