将 Facebook 群组帖子标记为帖子主题

时间:2021-03-20 13:36:48

标签: .net api facebook facebook-graph-api

图形 API 是否可以将帖子或帖子 ID 与帖子主题相关联?您可以在组下创建帖子主题,但图形 API 中应该有一种简单的方法来执行此操作。

dynamic post = new ExpandoObject();
            post.message = text;
            post.link = url;

            try
            {
                var response = client.Post($"/{facebookGroupId}/feed", post);

                Logger.Debug("Facebook Post ID:" + response);

                var dictionary = (IDictionary<string, object>)response;

                if (dictionary.ContainsKey("id"))
                {
                    return dictionary["id"].ToString();
                }
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
            }

0 个答案:

没有答案
相关问题