使用 Facebook Graph API 创建群组相关事件
我已经学会了如何使用新的 Graph API 在 Facebook 上创建事件。 由于我是一个拥有大约 1000 名成员的 Facebook 群组的管理员,因此我的目标是邀请该群组的所有成员参加该活动。 但我发现我只能邀请那些我的朋友(而且我什至不知道是否有限制),而使用旧系统你可以创建一个与群组相关的活动 - 旧的 URL 看起来像这样
http://www.facebook.com/groups/123456789/events
允许您邀请群组中的所有成员,即使不是您的朋友。 有谁知道 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您创建的活动不是 Facebook 中的公共活动(带有“任何人都可以查看和回复”的活动),您只能使用 Graph API 邀请您的朋友。如果它是公共事件,那么您可以通过提供用户的访问令牌和 RSVP_event 扩展权限来代表用户回复该事件。
RSVP ing 不是邀请。它代表 Facebook 用户设置状态(出席、可能出席、拒绝)。为此,您必须使用您想要参加活动的人员的访问令牌。这里不发送邀请,而是直接设置该用户的状态。为此,您必须向 graph.facebook.com/EVENT_ID/STATUS 发送 POST 请求,其中状态为 attend/maybe/declined 。请参阅 Developers.facebook.com/docs/reference/api/event 中的 STATUSES 部分
如果您想向 2 个用户(带有 accesstoken1 的 userid1 和带有 accesstoken2 的 userid2)回复事件“event1”,您必须按以下格式发出 2 个请求
< a href="https://graph.facebook.com/event1/attending?access_token=accesstoken1" rel="nofollow">https://graph.facebook.com/event1/attending?access_token=accesstoken1
和
https://graph.facebook.com/event1/attending?access_token=accesstoken2
请求一会将用户(userid1)的状态设置为出席,请求二将设置对于 user(userid2) 也是如此
摘要
希望我说清楚了。如果您需要进一步说明,请告诉我。
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
Hope I made myself clear. If you need further clarification let me know.