1

我代表我的用户在活动的墙上发布了一些内容:

$event_id = "XXXXXXXXXXXXXXX";

$message = array(
  'access_token' => $token,
  'message' => 'This is just a test...',
  'name' => 'Title',
  'caption' => "Caption goes here"
);

$result = $facebook->api($event_id."/feed", "POST", $message);

然后我像这样读出帖子ID:

$post_id = $result["id"];

// for example: 387914681250830_387939784581653
// where the format is EVENTID_POSTID

...我尝试删除同一个帖子:

try {
  $facebook->api($post_id, "DELETE");
}
catch (FacebookApiException $e) {
  $error = $e->getMessage();
  print $error;
}

结果是这样的:

(#100) Invalid post id

我什至尝试了这些版本(假设帖子 ID 是 387914681250830_387939784581653):

$facebook->api("/387914681250830_387939784581653/", "DELETE"); // (#100) invalid post_id

$facebook->api("/387939784581653", "DELETE"); // Unsupported delete request.

$facebook->api("/387914681250830/feed/387939784581653", "DELETE"); // Unknown path components: /387939784581653

所以现在我被困住了。有趣的是,API 返回的 POST_ID 原来是无效的。:-((

任何想法如何删除事件墙上(由我拥有)上的帖子(由我的应用程序创建)?

4

0 回答 0