How can I hide an event created using the Graph API from the timeline

I create a lot of events for the page using the api chart, up to a couple hundred at a time. However, each event creates a message on the timeline, which I would rather not do.

Is there a way to create an event so that it does not appear on the timeline? If not, how can I get a link to the ID for the message in the timeline? I write down the identifier of each event as its added, if that helps.

Thanks in advance for any help!

Jim

+4
source share
1 answer

I tried setting the "no_feed_story" parameter to 1, but it does not seem to perform the trick (at least in sandbox mode).

What I ended up with was making another request to get page feeds, to find the event post ID and then delete it (this requires publication permission)

Here is an example in php (sorry, I do not work with asp.net):

// .. curl was configured and the event created just before this. $newEventId = $result['id']; curl_setopt($ch, CURLOPT_URL, "https://graph.facebook.com/$page/feed?access_token=$accessToken"); curl_setopt($ch, CURLOPT_POST, false); $received_content = curl_exec($ch); $result = json_decode($received_content, true); foreach ($result['data'] as $feed) { if ($feed['link'] == "https://www.facebook.com/events/$newEventId/") { $postId = $feed['id']; break; } } if (isset($postId)) { curl_setopt($ch, CURLOPT_URL, "https://graph.facebook.com/$postId?access_token=$accessToken"); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE'); $received_content = curl_exec($ch); $result = json_decode($received_content, true); var_dump($result); } 
0
source

All Articles