问题描述
我有一个使用Graph API的应用程序。我有它为用户创建事件,但希望让用户从我们的网站邀请他们的朋友,而不必去事件Facebook页面。有谁知道请求我也要发送朋友的ID,以邀请他们像旧的API?还是甚至存在?我发现很多API文档中的细节更加模糊。谢谢!另外,旁边的问题,你可以用创建POST发送活动照片吗?我没有提到如何在活动创作中提交照片。谢谢。
实际上可以使用Graph API,特别是被邀请
连接事件
的对象:
POST / EVENT_ID / invite / USER_ID
邀请用户参加活动。如果请求成功,返回 true
POST / EVENT_ID / invite?users = USER_ID1,USER_ID2,USER_ID3
邀请多位用户参加活动。如果请求成功,则返回 true
。
您需要 create_event
权限。更多信息,请参阅。
I have an application using the Graph API. I have it creating events for the user, but would like to let the user invite their friends from our site instead of having to go to the events Facebook page. Does anyone know of the request I have to send the friends' IDs too to invite them like with the old API? Or if it even exists? I am finding a lot of the finer details in the API documentation are vague. Thank you!
Also, side question, can you send an event photo with the create POST? I see no mention on how to submit a photo with the event creation. Thanks.
This is actually possible with the Graph API, specifically the invited
connection of the event
's object:
POST /EVENT_ID/invited/USER_ID
Invite a user to an event. Returns true
if the request is successful.
POST /EVENT_ID/invited?users=USER_ID1,USER_ID2,USER_ID3
Invite multiple users to an event. Returns true
if the request is successful.
You'll need the create_event
permission. More info is available in this post.
这篇关于如何邀请用户的朋友参加活动? Facebook Graph API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!