0
我正在檢索使用無法使用Facebook的API
if (window.location.hash.length == 0) {
url = "https://www.facebook.com/dialog/oauth?client_id=" +
appId + "&redirect_uri=" + window.location +
"&response_type=token&scope=email,read_stream,publish_stream";
window.location.href(url);
} else {
accessToken = window.location.hash.substring(1);
}
訪問令牌和發佈使用
FacebookClient client = new FacebookClient(strAccessToken);
Dictionary<string, object> postMessage = new Dictionary<string, object>();
postMessage["message"] = "test post from facebook app";
postMessage["link"] ="http://google.com";
postMessage["name"] = "";
postMessage["caption"] = "";
postMessage["description"] = "test post from facebook app";
object result = client.Post("me/feed", postMessage);
我正在gettig錯誤「無法連接到遠程服務器」
飼料發佈這裏有什麼問題?
你的appId是否正確?這總是我檢查的第一件事。您也可以嘗試調試並獲取「url」,然後嘗試通過瀏覽器進行測試。如果正確的話,Facebook通常會向你投擲一些東西,如果不正確,你就知道要從那裏出發 – 2011-05-20 15:08:55