我想使用 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/