我正在使用以下代码在facebook上发布故事:
FacebookWebClient facebookWebClient = new FacebookWebClient(UserSession.CurrentFacebookProfileAccessToken);
string URL="https://graph.facebook.com/me/tsstesting:start";
var parameters = new Dictionary<string, object>();
parameters["og:type"] = "tsstesting:myurl";
parameters["urlname"] = "http://on.fb.me/12rMxhV";
parameters["title"] = "QBSTab";
try
{
dynamic result = facebookWebClient.Post(URL, parameters); // again here should be your app name instead of "myapp"
JObject friendListJson = JObject.Parse(result.ToString());
string returval = friendListJson["id"].ToString();
return returval;
}
catch (Exception e)
{
return e.Message;
}
它给了我异常在'网站'类型的网址'https://www.facebook.com/'处的对象无效,因为属性'og:locale:alternate'的给定值'www'无法解析为类型'枚举。
我在这里缺少什么?