1

我曾尝试使用我创建并成功的此桌面应用程序在我的 Facebook 群组上发布普通帖子,我可以发布普通帖子或具有链接以正常显示其预览的帖子,但在分享某个页面的帖子并显示预览时发生了一些错误并且帖子没有发布我不知道它为什么这样做所以我想我可以在这里使用一些技巧,,, 这是我的 C# 代码

            var postArgs = new Dictionary<string, object>();
            postArgs["message"] = "some status update here";
            postArgs["link"] = "the desired link;
            var fb = new FacebookClient(Settings.Default.AccessToken)
                         {
                             AppId = CurrentValues.appId,
                             AppSecret = CurrentValues.appSecret
                         };
             await fb.PostTaskAsync(
                                string.IsNullOrEmpty(destination)
                                    ? "/me/feed"
                                    : string.Format("/{0}/feed", destination),
                                postArgs);

其中包含此代码的方法被标记为异步方法,“destination”是包含 groupId 的方法参数。

4

0 回答 0