使用 Facebook Graph API 创建群组相关事件

发布于 2024-12-11 16:30:53 字数 388 浏览 0 评论 0原文

我已经学会了如何使用新的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

长发绾君心 2024-12-18 16:30:53

如果您创建的活动不是 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) 也是如此

摘要

  • 在公共活动中,任何人都可以参与。通过应用程序,您可以使用他/她的用户访问令牌(不是您的)向用户(您的朋友与否并不重要,但必须已使用 rsvp_event 权限授权您的应用程序)参加该活动,或使用您的用户访问令牌邀请您的朋友
  • 在私人和非公开活动中,您可以邀请或回复,但仅限您的朋友。

希望我说清楚了。如果您需要进一步说明,请告诉我。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文