我可以发布到Facebook墙,但我应该如何在群组中发布状态?
public void Wall_Post_Publish()
{
FacebookClient app = new FacebookClient();
dynamic parameters = new ExpandoObject();
parameters.access_token = ConfigurationManager.AppSettings["AccessToken"];
parameters.message = "This is a test message that has been published by the Facebook C# SDK on Codeplex. " + DateTime.UtcNow.Ticks.ToString();
parameters.attribution = "Facebook C# SDK";
dynamic result = app.Post("/me/feed", parameters);
Assert.NotEqual(null, result.id);
}
但如何在群组中发布
答案 0 :(得分:0)
您只需要使用组ID而不是“我”:
dynamic result = app.Post("/group-id/feed", parameters);
请注意,您需要publish_actions
和user_groups
或user_managed_groups
才能发布到论坛。 user_groups
不会获得批准,因此您最好使用user_managed_groups
。
来源:https://developers.facebook.com/docs/graph-api/reference/v2.3/group/feed#publish