Create a group related event with Facebook Graph API

I've learnt how to create an Event on Facebook with the new Graph API. Since I'm the administrator of a Facebook Group with about a thousand members, my aim is to invite all the group's members to the event. But I've found out that I can only invite just those who are my friends (and I don't even know if there's a limit), while with the old system you could create a group related event - the old URL looked like this

http://www.facebook.com/groups/123456789/events

that allowed you to invite all the members of the group, even those who are not your friends. Does anybody know if this is possible with the Graph API, or if there is a workaround to do such thing? Thanks


If the event you create is not a Public event (event with "Anyone can view and RSVP") in Facebook, you can invite only your friends using Graph API. If it is a public event then you can RSVP the event on behalf of the user by providing his access token and with RSVP_event extended permission.

RSVP ing is not invitation. It is setting a status (Attending, maybe attending, declined) on behalf of a Facebook user. For that you have to use the access token of the person whom you want to participate in the event. Here no invitation is sent but instead you are directly setting the status of that user. For this you have to sent a POST request to graph.facebook.com/EVENT_ID/STATUS where status is attending/maybe/declined . Refer STATUSES section in developers.facebook.com/docs/reference/api/event

If you want to RSVP 2 users (userid1 with accesstoken1 and userid2 with accesstoken2) to an event "event1" you have to issue 2 requests in the following format

https://graph.facebook.com/event1/attending?access_token=accesstoken1

and

https://graph.facebook.com/event1/attending?access_token=accesstoken2

Request one will set the status of user(userid1) as attending and request two will set the same for user(userid2)

SUMMARY

  • In public events anyone can participate. With an application you can rsvp the user(your friend or not doesn't matter,but must have authorized your app with rsvp_event permission) to that event with his/her user accesstoken(not yours) or invite your friends with your user access token
  • In private and closed events you can invite or rsvp, but only those who are your friends.
  • Hope I made myself clear. If you need further clarification let me know.

    链接地址: http://www.djcxy.com/p/32652.html

    上一篇: Graph API停滞

    下一篇: 使用Facebook Graph API创建组相关事件