我正在Facebook上通過Facebook C#SDK發佈事件。我可以通過它登錄並生成訪問令牌。但是,當我發佈事件我有錯誤:Facebook事件給出錯誤「參數eid必須是有效的事件ID」
Facebook.FacebookOAuthException: (OAuthException - #100) (#100) Param eid must be a valid event id
at Facebook.FacebookClient.ProcessResponse(HttpHelper httpHelper, String responseString, Type resultType, Boolean containsEtag, IList`1 batchEtags)
at Facebook.FacebookClient.Api(HttpMethod httpMethod, String path, Object parameters, Type resultType)
at Facebook.FacebookClient.Post(String path, Object parameters)
at FacebookSDK.Facebook.CreateEvent(FBEvent fbEvent)
我的代碼是
public void CreateEvent(FBEvent fbEvent)
{
var fb = new FacebookClient(this.AccessToken);
dynamic parameters = new ExpandoObject();
parameters.eid = "524654568165461";
parameters.owner = "me";
parameters.description = fbEvent.Description;
parameters.name = fbEvent.Title;
parameters.start_time = fbEvent.StartTime.ToString("yyyy-MM-dd hh:mm:ss");
parameters.end_time = fbEvent.EndTime.ToString("yyyy-MM-dd hh:mm:ss");
parameters.privacy = fbEvent.PrivacyInfo;
parameters.access_token = this.AccessToken;
dynamic result = fb.Post("me/event", parameters);
}
我怎樣才能解決這個問題....
我運氣不好!我刪除了行。但仍然無法正常工作,錯誤與上述相同。 – 2013-02-18 06:20:12