Joey Levy
Joey Levy

Reputation: 99

Create a Facebook event for a group in Facebook Graph API

What I'm trying to do: At the top of group pages, there is an events button that list events for the group. If I open a group and click the create event button, the entire group is invited to the event, even if they are not my friend, and the group "events list" gets another entry. I would like to add an event using the Graph API. The account in question is a group admin.

I have successfully created events in a variety of interesting ways in the API, but never managed to link it with a group.

Created event, didn't show up in group: https://graph.facebook.com/{groupID}/events?...

another post suggested using the param 'data page_id' => '{groupID}' I thought of trying 'gid' => '{groupID}' because that is how the facebook event create page does it. It creates the event, but the event is not linked to a group.

Nothing I have tried seems to do the trick. I click into the group in FB and cannot see the event listed at the top, on the right.

I have set scope=create_event,user_events,user_groups

More info: I am making an application to take events from FB, google calendar or meetup and post to the other sites without double entry. Since it is designed for group organizers, it really needs to be able to post the event into the group and not have the user invite people directly.

Upvotes: 3

Views: 1216

Answers (2)

holden
holden

Reputation: 13581

This a complicated question. The FB Graph 1.0 documentation is wrong:

https://developers.facebook.com/docs/graph-api/reference/v1.0/group/events

They specify:

'POST',
  '/{app-id}/groups',
  array (
    'name' => 'Test Group Event',
    'start_time' => '2012-07-04T19:00:00-0700',
  )

Which is odd, since it makes no mention of the group-id (which it should be attached to), or that you want an event. It will instead create a new group and not an attached event. But using something like should work (at least for a few months):

'POST',
  '/{group-id}/events',
  array (
    'name' => 'Test Group Event',
    'start_time' => '2012-07-04T19:00:00-0700',
  )

You also need to do it with the access_token of a group admin. (which is the only correct advice from the docs):

A user access token for a member of the group with user_groups and create_events permission.

The create_events permission has been silently depreciated as of Graph API 2.0 without any mention of whether or not it will return, despite the fact that many large companies such as QuestionOne & EventBrite rely on it.

https://developers.facebook.com/docs/apps/changelog

However if you created an app before April 2014, you can still specify version 1.0 of the Graph API and use this feature, at least until April 30st 2015 when completely depreciate 1.0. After that, you're out of luck.

Upvotes: 1

adamturtle
adamturtle

Reputation: 57

According to the documentation, Facebook has no connection between the Groups object and Events.

Upvotes: 0

Related Questions