开发者

Facebook requests with .net facebook sdk

开发者 https://www.devze.com 2023-01-25 05:36 出处:网络
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 开发者_运

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!


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."

0

精彩评论

暂无评论...
验证码 换一张
取 消