使用 .net facebook sdk 进行 Facebook 请求

发布于 2024-10-02 05:36:48 字数 236 浏览 0 评论 0原文

我如何使用 facebook sdk 执行以下操作? -> http://developers.facebook.com/docs/guides/canvas/#requests <- 我不需要第一个框,但人员选择器是必要的。

干杯!

How can I do something like the following with the facebook sdk? -> http://developers.facebook.com/docs/guides/canvas/#requests <- I don't need the first box, but the people picker would be necessary.

Cheers!

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

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

发布评论

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

评论(1

千柳 2024-10-09 05:36:48

FBML 与 Facebook C# SDK 或任何服务器端 SDK 无关。您将需要使用 Javascript SDK 来渲染 fbml。您只需添加对 javascript SDK 的引用,如下所示:

<div id="fb-root"></div>
<script>
  window.fbAsyncInit = function() {
    FB.init({appId: 'your app id', status: true, cookie: true,
             xfbml: true});
  };
  (function() {
    var e = document.createElement('script'); e.async = true;
    e.src = document.location.protocol +
      '//connect.facebook.net/en_US/all.js';
    document.getElementById('fb-root').appendChild(e);
  }());
</script>

此外,如果可以避免,则不应在新应用程序中使用任何旧的 FBML。您应该使用社交插件。 Facebook 表示:“我们正在弃用 FBML。如果您要在 Facebook.com 上构建新的应用程序,请使用我们的 JavaScript SDK 和社交插件在 iframe 中实现您的应用程序。尽管仍有一些功能我们尚未实现移植完毕后,我们不再向 FBML 添加新功能。”

FBML has nothing to do with the Facebook C# SDK or any server side SDK. You will want to use the Javascript SDK to render the fbml. You simply need to add a reference to the javascript SDK like this:

<div id="fb-root"></div>
<script>
  window.fbAsyncInit = function() {
    FB.init({appId: 'your app id', status: true, cookie: true,
             xfbml: true});
  };
  (function() {
    var e = document.createElement('script'); e.async = true;
    e.src = document.location.protocol +
      '//connect.facebook.net/en_US/all.js';
    document.getElementById('fb-root').appendChild(e);
  }());
</script>

Additionally, you should not be using any of the old FBML in a new app if you can avoid it. You should use the social plugins. Facebook States: "We are in the process of deprecating FBML. If you are building a new application on Facebook.com, please implement your application within an iframe, using our JavaScript SDK and Social Plugins. While there is still functionality that we have not ported over yet, we are no longer adding new features to FBML."

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