i am retrieving access token using
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);
}
and publishing the feed using
Faceboo开发者_开发技巧kClient 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);
i am gettig the error 'unable to connect to remote server'
What could be the wrong here?
You're storing the token in 'accessToken' but passing 'strAccessToken'? Could it be that simple?
加载中,请稍侯......
精彩评论