c# - 使用 Graph API 将更新发布到 Facebook 粉丝页面?

标签 c# .net asp.net facebook

我想使用 Graph API 在面子书页面上发帖。代码将在 Asp.Net 和 c# 中。只需要知道如何发帖到面子书页面(不是帐户)。我可以发送到帐户,现在想在页面上发帖。我引用了这个链接 Graph API

请帮我解决这个问题。

提前致谢。

最佳答案

我有一个可用的 PHP 代码,希望您可以使它适用于 c#。

基本上,我将 php-curl 用于粉丝页面的 url 提要。 你应该能够找到 curl 的 c# 包装器/绑定(bind),也许这个 libcurl for .NET

$url = "https://graph.facebook.com/PAGE_ID/feed";

$attachment =  array(

          'access_token' => 'YOUR_ACCESS_TOKEN',
          'message' => 'your message',
                'name' => "your title",
                'link' => "your link",
                'description' => "your description",

        );

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $attachment);

$result= curl_exec($ch);
curl_close ($ch);

关于c# - 使用 Graph API 将更新发布到 Facebook 粉丝页面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4291291/

相关文章:

c# - SignalR:通过代理服务器建立隧道失败

c# - 单元测试数据库代码

c# - 延迟控制台应用程序几秒钟的最佳方法是什么

asp.net - 在 ASP.NET 中本地化图像

c# - BeginSend<IList<ArraySegment....) 是否执行所有 ArraySegment 的原子发送?

c# - 无法加载文件或程序集 SMDiagnostics.dll

asp.net - LINQ:自定义列名

c# - jquery 中的 insidehtml 等效项不起作用

c# - 在 Emgu.CV 中,这些阈值是什么意思,是否有更好的方法来检测圆?

c# - 似乎无法将 Linq 与 ASP.Net 导航菜单一起使用