你或許應該作爲它的基礎了Facebook的JavaScript SDK周圍,至少那是什麼Docs現在推薦。一個非常簡單的「Hello用戶」類型的應用程序(實際上只是一個簡單的網頁)可能是這個樣子:
<html><body>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({
appId : 'YOUR APP ID',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
FB.getLoginStatus(function(response) {
if (response.session) {
FB.api('/me', function(api_response) {
document.getElementById("usr-name").innerHTML=api_response.name;
document.getElementById("app-content").style.display="block";
});
}
else {
alert("not logged in!") ;
}
});
</script>
<div id="app-content" style="display:none">
Hello <span id="usr-name"></span>!
</div>
</body></html>
希望這有助於!
但我怎樣才能將c#與它結合? – Delashmate 2011-01-07 13:55:12