我試圖在我的網站上提供允許用戶爲其預訂創建Facebook事件的設施。我的應用程序牆上的facebook create_event帖子不是用戶的牆
http://developers.facebook.com/docs/reference/api/event/
現在即時通訊做正確的流程:
1)首先得到授權,請求訪問令牌與在返回的「密碼」,用戶 https://graph.facebook.com/oauth/authorize?client_id=APP_ID&redirect_uri=http://urlimredirectingto.comtype=web_server
2)步驟1 https://graph.facebook.com/oauth/access_token
3)使用access_token創建事件...
string facebookCreateUri = string.Format("https://graph.facebook.com/{0}/events", loggedInMember.FacebookUID);
var formData = new HttpUrlEncodedForm()
{
{"access_token", accessToken},
{"owner", loggedInMember.FacebookUID},
{"description", "nice event that should be on the owners wall"},
{"name", "event on the users wall"},
{"start_time", "1272718027"},
{"end_time", "1272718027"},
{"location", "rochester"},
{"privacy","OPEN"}
};
HttpContent content = HttpContent.Create(formData);
HttpClient client = new HttpClient();
var response = client.Post(facebookCreateUri, "application/x-www-form-urlencoded", content);
但事件發佈在我的應用程序的牆上,而不是用戶的牆上。它不應該與authentication/access_token元素有任何關係,因爲我使用相同的過程在用戶的牆上發佈。 (http://developers.facebook.com/docs/reference/api/status/),這工作得很好。