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.
Related
When a user blocks my facebook bot account I can't handle any query about this action, but I need this information on my API. I try to write to an unavailable person from Facebook Page, but I just get an error "this person isn't available right now" in front and without query to my API
How I can handle, find and check unavailables users?
I thought to handle actions from chat on application's Facebook page (Mark as Done, Delete chat, etc), but I don't know how I can to get this on my API.
Facebook actions
There is no specific event for such an action (user blocking the conversation), so your only option is to handle the person-not-avail error response and mark those users on your end.
Is it possible to invite users friends via open graph to an event created by an app on Facebook? Or does the user have to have created/own the event?
Similarly, is it possible to invite users friends via open graph to an event created by an page on Facebook? Or does the user have to have created/own the event?
Finally - is create_event required to be approved by the user, even if they are only inviting their friends to an event, not creating that event (as it has been created by the app/page)
Yes you can invite users to any event the user has access to (public event or invited to an event with invite permissions). However create_event permission is always required to invite. Keep in mind that users invited by an app will not receive notifications, however the event will appear in their upcoming events list.
More info:
https://developers.facebook.com/docs/reference/api/event/
I have an exsiting event which I'm trying to invite users to using this method:
https://api.facebook.com/method/events.invite
?eid=EID
&uids=UIDS
&access_token=ACCESS_TOKEN
...this sort of works, in that the invited user gets a post to their wall like this:
Test Event — 19 March at 14:08.
User invited you · View · Join
But my problem is, the invited user DOESN'T get a notification.
The code is taken from here:
http://developers.facebook.com/docs/reference/rest/events.invite/
But when I run if from there, which is identical to my above code, the invited user DOES get a notification.
What am I doing wrong / missing?
Thanks
You are using a deprecated method and should switch to using graph api requests.
In this case, you can use the Event object in the graph.
Doing the same thing with the graph api should look something like:
https://graph.facebook.com/EVENT_ID/invited/USER_ID
or
https://graph.facebook.com/EVENT_ID/invited?users=USER_ID1,USER_ID2,USER_ID3
(You should have the create_event permission and an active access token of course)
This is copied from the document, under the invited section. You might also might want to check the attending, maybe and declined sections.
You can use the Graph API Explorer tool to test graph calls.
Edit
I'm sorry for not including this with my original answer:
The invitation made by the graph api (or the deprecated REST) does not result in notifications in the users' side.
You can find a few more threads about this subject here:
Invite user(s) to event with notification - works manually but not with Graph API
Facebook: No Notification when App sends event Invites via Open Graph
invite for an event by graph api doesn't send notification
But the best indication for this being the case can be found in this bug ticket: Bugs - No Notifications on Event invites via Graph API.
Notice the response from facebook:
event invites do not currently render an on-site notification, this is
a deliberate limitation of the API Event invites made this way will
still increment the counter in the 'events' bookmark and add the event
to the user's events list
Hope this clarify things.
While Facebook Events typically work by the creator inviting Friends to the Event and then Friend's replying to the Invite (or RSVP if you like), I'm wondering if it's possible to RSVP to a public event from the API for a Facebook user who hasn't been invited?
The use case is a website that displays the client's Events and has an "I'm attending" feature. Users could then authenticate with Facebook Connect and RSVP to events which will set them as an attendee on the Facebook Event.
The real issue is that users of the App won't be explicitly invited to each event, but as they are public events, I'm wondering if the invite is even required?
If you have the rsvp_event permission for the user you can RSVP them to any event they have permission to join (i.e public events)
See here: https://developers.facebook.com/docs/reference/api/event/#attending
Can facebook send reminder invitation for application request? In my web application ,member have facility to send invitation to his/her facebook friend for join my application. I am using facebook multi selector to send application invitation. I want to send a reminder invitation after a one week to facebook user which haven't join my application. Can anyone tell me how can i send a reminder to facebook user for join my application? Can facebook give any facility to send reminder via multiselector or if facebook provide and other facility.
Plz give any suggestion.
Thanks!
What about you go about it this way:
use the facebook API to connect the user and list his/her friend on your site with a checkbox beside each.
Send an invitation to the checked friends (via a dm maybe) and save the friend list in a db (you can call the table 'invites' and should include date, invitee and status). The invitation/registeration link should include a referer id to track the invitee.
Once the invitation is honored, GET the referer id and update the status to registered (you can denote that with 1).
Setup a daily cron to check for invites with not registered status that is 15 days. Resend invite to them.
Only problem is storing the user's friends has great privacy issues. If you must do it, make proper provisions in your privacy policy.