facebook4j.api
Interface EventMethods

All Known Subinterfaces:
Facebook

public interface EventMethods

Author:
Ryuji Yamashita - roundrop at gmail.com

Method Summary
 String createEvent(EventUpdate eventUpdate)
          Creates the event for the current user/page.
 String createEvent(String id, EventUpdate eventUpdate)
          Creates the event for a user/event/page.
 boolean deleteEvent(String eventId)
          Deletes the event.
 boolean deleteEventPicture(String eventId)
          Deletes the event's profile picture.
 boolean editEvent(String eventId, EventUpdate eventUpdate)
          Updates the event.
 Event getEvent(String eventId)
          Returns a single event.
 Event getEvent(String eventId, Reading reading)
          Returns a single event.
 ResponseList<Photo> getEventPhotos(String eventId)
          Returns the event's photos.
 ResponseList<Photo> getEventPhotos(String eventId, Reading reading)
          Returns the event's photos.
 URL getEventPictureURL(String eventId)
          Returns url of the event's profile picture.
 URL getEventPictureURL(String eventId, PictureSize size)
          Returns url of the event's profile picture.
 ResponseList<Event> getEvents()
          Returns the events the current user/page is attending.
 ResponseList<Event> getEvents(Reading reading)
          Returns the events the current user/page is attending.
 ResponseList<Event> getEvents(String id)
          Returns the events a user/event/page is attending.
 ResponseList<Event> getEvents(String id, Reading reading)
          Returns the events a user/event/page is attending.
 ResponseList<Video> getEventVideos(String eventId)
          Returns the event's videos.
 ResponseList<Video> getEventVideos(String eventId, Reading reading)
          Returns the event's videos.
 ResponseList<RSVPStatus> getRSVPStatusAsInvited(String eventId)
          Returns a list of invitees for the event.
 ResponseList<RSVPStatus> getRSVPStatusAsInvited(String eventId, String userId)
          Checks a specific user has been invited to the event.
 ResponseList<RSVPStatus> getRSVPStatusAsNoreply(String eventId)
          Returns a list of all users who have not replied to the event.
 ResponseList<RSVPStatus> getRSVPStatusAsNoreply(String eventId, String userId)
          Returns a single user who have not replied to the event.
 ResponseList<RSVPStatus> getRSVPStatusInAttending(String eventId)
          Returns a list of all users who responded 'yes' to the event.
 ResponseList<RSVPStatus> getRSVPStatusInAttending(String eventId, String userId)
          Checks a specific user responded 'yes' to the event.
 ResponseList<RSVPStatus> getRSVPStatusInDeclined(String eventId)
          Returns a list of all users who responded 'no' to the event.
 ResponseList<RSVPStatus> getRSVPStatusInDeclined(String eventId, String userId)
          Checks a specific user responded 'no' to the event.
 ResponseList<RSVPStatus> getRSVPStatusInMaybe(String eventId)
          Returns a list of all users who responded 'maybe' to the event.
 ResponseList<RSVPStatus> getRSVPStatusInMaybe(String eventId, String userId)
          Checks a specific user responded 'maybe' to the event.
 boolean inviteToEvent(String eventId, String userId)
          Invites a user to the event.
 boolean inviteToEvent(String eventId, String[] userIds)
          Invites users to the event.
 String postEventLink(String eventId, URL link)
          Posts the link on a event's wall.
 String postEventLink(String eventId, URL link, String message)
          Posts the link on a event's wall.
 String postEventPhoto(String eventId, Media source)
          Posts the photo on a event's wall.
 String postEventPhoto(String eventId, Media source, String message)
          Posts the photo on a event's wall.
 String postEventStatusMessage(String eventId, String message)
          Posts the status message on a event's wall.
 String postEventVideo(String eventId, Media source)
          Posts the video on a event's wall.
 String postEventVideo(String eventId, Media source, String title, String description)
          Posts the video on a event's wall.
 boolean rsvpEventAsAttending(String eventId)
          RSVPs the current user as 'attending' the event.
 boolean rsvpEventAsDeclined(String eventId)
          RSVPs the current user as 'declined' the event.
 boolean rsvpEventAsMaybe(String eventId)
          RSVPs the current user as 'maybe' the event.
 boolean uninviteFromEvent(String eventId, String userId)
          Un-invites user from the event.
 boolean updateEventPicture(String eventId, Media source)
          Updates the event's profile picture.
 

Method Detail

getEvents

ResponseList<Event> getEvents()
                              throws FacebookException
Returns the events the current user/page is attending.

Returns:
events
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User - Facebook Developers - Connections - events, Page - Facebook Developers - Connections - events

getEvents

ResponseList<Event> getEvents(Reading reading)
                              throws FacebookException
Returns the events the current user/page is attending.

Parameters:
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
events
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User - Facebook Developers - Connections - events, Page - Facebook Developers - Connections - events

getEvents

ResponseList<Event> getEvents(String id)
                              throws FacebookException
Returns the events a user/event/page is attending.

Parameters:
id - the ID of a user
Returns:
events
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User - Facebook Developers - Connections - events, Page - Facebook Developers - Connections - events

getEvents

ResponseList<Event> getEvents(String id,
                              Reading reading)
                              throws FacebookException
Returns the events a user/event/page is attending.

Parameters:
id - the ID of a user/page
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
events
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User - Facebook Developers - Connections - events, Page - Facebook Developers - Connections - events

createEvent

String createEvent(EventUpdate eventUpdate)
                   throws FacebookException
Creates the event for the current user/page.

Parameters:
eventUpdate -
Returns:
The new event ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#events - Facebook Developers, Page#events - Facebook Developers - Connections - events

createEvent

String createEvent(String id,
                   EventUpdate eventUpdate)
                   throws FacebookException
Creates the event for a user/event/page.

Parameters:
id - the ID of a user/page
eventUpdate - a event to be created
Returns:
The new event ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#events - Facebook Developers, Page#events - Facebook Developers - Connections - events

editEvent

boolean editEvent(String eventId,
                  EventUpdate eventUpdate)
                  throws FacebookException
Updates the event.

Parameters:
eventId - the ID of a event
eventUpdate - the event to be updated
Returns:
true if update is successful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#events - Facebook Developers, Page#events - Facebook Developers - Connections - events

deleteEvent

boolean deleteEvent(String eventId)
                    throws FacebookException
Deletes the event.

Parameters:
eventId - the ID of a event
Returns:
true if delete is successful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#events - Facebook Developers, Page#events - Facebook Developers - Connections - events

getEvent

Event getEvent(String eventId)
               throws FacebookException
Returns a single event.

Parameters:
eventId - the ID of a event
Returns:
event
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event - Facebook Developers

getEvent

Event getEvent(String eventId,
               Reading reading)
               throws FacebookException
Returns a single event.

Parameters:
eventId - the ID of a event
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
event
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event - Facebook Developers

postEventLink

String postEventLink(String eventId,
                     URL link)
                     throws FacebookException
Posts the link on a event's wall.

Parameters:
eventId - the ID of a event
link - link URL
Returns:
The new link ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#links - Facebook Developers

postEventLink

String postEventLink(String eventId,
                     URL link,
                     String message)
                     throws FacebookException
Posts the link on a event's wall.

Parameters:
eventId - the ID of a event
link - link URL
message - link message
Returns:
The new link ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#links - Facebook Developers

postEventStatusMessage

String postEventStatusMessage(String eventId,
                              String message)
                              throws FacebookException
Posts the status message on a event's wall.

Parameters:
eventId - the ID of a event
message - status message content
Returns:
The new status message ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#statuses - Facebook Developers

getRSVPStatusAsNoreply

ResponseList<RSVPStatus> getRSVPStatusAsNoreply(String eventId)
                                                throws FacebookException
Returns a list of all users who have not replied to the event.

Parameters:
eventId - the ID of a event
Returns:
a list of all users who have not replied to the event
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#noreply - Facebook Developers

getRSVPStatusAsNoreply

ResponseList<RSVPStatus> getRSVPStatusAsNoreply(String eventId,
                                                String userId)
                                                throws FacebookException
Returns a single user who have not replied to the event.

Parameters:
eventId - the ID of a event
Returns:
a single users who have not replied to the event
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#noreply - Facebook Developers

getRSVPStatusAsInvited

ResponseList<RSVPStatus> getRSVPStatusAsInvited(String eventId)
                                                throws FacebookException
Returns a list of invitees for the event.

Parameters:
eventId - the ID of a event
Returns:
a list of invitees for the event
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#invited - Facebook Developers

getRSVPStatusAsInvited

ResponseList<RSVPStatus> getRSVPStatusAsInvited(String eventId,
                                                String userId)
                                                throws FacebookException
Checks a specific user has been invited to the event.

Parameters:
eventId - the ID of a event
userId - the ID of a user
Returns:
the user has been invited to this event
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#invited - Facebook Developers

inviteToEvent

boolean inviteToEvent(String eventId,
                      String userId)
                      throws FacebookException
Invites a user to the event.

Parameters:
eventId - the ID of a event
userId - the ID of the user
Returns:
true if the invite is successful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#invited - Facebook Developers

inviteToEvent

boolean inviteToEvent(String eventId,
                      String[] userIds)
                      throws FacebookException
Invites users to the event.

Parameters:
eventId - the ID of a event
userIds - the IDs of users
Returns:
true if the invite is successful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#invited - Facebook Developers

uninviteFromEvent

boolean uninviteFromEvent(String eventId,
                          String userId)
                          throws FacebookException
Un-invites user from the event.

Parameters:
eventId - the ID of a event
userId - the ID of a user
Returns:
true if the un-invite is successful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#invited - Facebook Developers

getRSVPStatusInAttending

ResponseList<RSVPStatus> getRSVPStatusInAttending(String eventId)
                                                  throws FacebookException
Returns a list of all users who responded 'yes' to the event.

Parameters:
eventId - the ID of a event
Returns:
a list of all users who responded 'yes' to the event
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#attending - Facebook Developers

getRSVPStatusInAttending

ResponseList<RSVPStatus> getRSVPStatusInAttending(String eventId,
                                                  String userId)
                                                  throws FacebookException
Checks a specific user responded 'yes' to the event.

Parameters:
eventId - the ID of a event
userId - the ID of a user
Returns:
a specific user responded 'yes' to the event
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#attending - Facebook Developers

rsvpEventAsAttending

boolean rsvpEventAsAttending(String eventId)
                             throws FacebookException
RSVPs the current user as 'attending' the event.

Parameters:
eventId - the ID of a event
Returns:
true if the RSVP is successful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#attending - Facebook Developers

getRSVPStatusInMaybe

ResponseList<RSVPStatus> getRSVPStatusInMaybe(String eventId)
                                              throws FacebookException
Returns a list of all users who responded 'maybe' to the event.

Parameters:
eventId - the ID of a event
Returns:
a list of all users who responded 'maybe' to the event
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#maybe - Facebook Developers

getRSVPStatusInMaybe

ResponseList<RSVPStatus> getRSVPStatusInMaybe(String eventId,
                                              String userId)
                                              throws FacebookException
Checks a specific user responded 'maybe' to the event.

Parameters:
eventId - the ID of a event
userId - the ID of a user
Returns:
a specific user responded 'maybe' to the event
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#maybe - Facebook Developers

rsvpEventAsMaybe

boolean rsvpEventAsMaybe(String eventId)
                         throws FacebookException
RSVPs the current user as 'maybe' the event.

Parameters:
eventId - the ID of a event
Returns:
true if the RSVP is successful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#maybe - Facebook Developers

getRSVPStatusInDeclined

ResponseList<RSVPStatus> getRSVPStatusInDeclined(String eventId)
                                                 throws FacebookException
Returns a list of all users who responded 'no' to the event.

Parameters:
eventId - the ID of a event
Returns:
a list of all users who responded 'no' to the event
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#declined - Facebook Developers

getRSVPStatusInDeclined

ResponseList<RSVPStatus> getRSVPStatusInDeclined(String eventId,
                                                 String userId)
                                                 throws FacebookException
Checks a specific user responded 'no' to the event.

Parameters:
eventId - the ID of a event
userId - the ID of a user
Returns:
a specific user responded 'no' to the event
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#declined - Facebook Developers

rsvpEventAsDeclined

boolean rsvpEventAsDeclined(String eventId)
                            throws FacebookException
RSVPs the current user as 'declined' the event.

Parameters:
eventId - the ID of a event
Returns:
true if the RSVP is successful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#declined - Facebook Developers

getEventPictureURL

URL getEventPictureURL(String eventId)
                       throws FacebookException
Returns url of the event's profile picture.

Parameters:
eventId - the ID of a event
Returns:
url
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#picture - Facebook Developers

getEventPictureURL

URL getEventPictureURL(String eventId,
                       PictureSize size)
                       throws FacebookException
Returns url of the event's profile picture.

Parameters:
eventId - the ID of a event
size - picture size
Returns:
url
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#picture - Facebook Developers

updateEventPicture

boolean updateEventPicture(String eventId,
                           Media source)
                           throws FacebookException
Updates the event's profile picture.

Parameters:
eventId - the ID of a event
source - picture resource
Returns:
true if update is successful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#picture - Facebook Developers

deleteEventPicture

boolean deleteEventPicture(String eventId)
                           throws FacebookException
Deletes the event's profile picture.

Parameters:
eventId - the ID of a event
Returns:
true if update is successful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#picture - Facebook Developers

getEventPhotos

ResponseList<Photo> getEventPhotos(String eventId)
                                   throws FacebookException
Returns the event's photos.

Parameters:
eventId - the ID of a event
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#photos - Facebook Developers

getEventPhotos

ResponseList<Photo> getEventPhotos(String eventId,
                                   Reading reading)
                                   throws FacebookException
Returns the event's photos.

Parameters:
eventId - the ID of a event
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#photos - Facebook Developers

postEventPhoto

String postEventPhoto(String eventId,
                      Media source)
                      throws FacebookException
Posts the photo on a event's wall.

Parameters:
eventId - the ID of a event
source - photo resource
Returns:
The new photo ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#photos - Facebook Developers

postEventPhoto

String postEventPhoto(String eventId,
                      Media source,
                      String message)
                      throws FacebookException
Posts the photo on a event's wall.

Parameters:
eventId - the ID of a event
source - photo resource
message - photo description
Returns:
The new photo ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#photos - Facebook Developers

getEventVideos

ResponseList<Video> getEventVideos(String eventId)
                                   throws FacebookException
Returns the event's videos.

Parameters:
eventId - the ID of a event
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#videos - Facebook Developers

getEventVideos

ResponseList<Video> getEventVideos(String eventId,
                                   Reading reading)
                                   throws FacebookException
Returns the event's videos.

Parameters:
eventId - the ID of a event
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#videos - Facebook Developers

postEventVideo

String postEventVideo(String eventId,
                      Media source)
                      throws FacebookException
Posts the video on a event's wall.

Parameters:
eventId - the ID of a event
source - video resource
Returns:
The new video ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#videos - Facebook Developers

postEventVideo

String postEventVideo(String eventId,
                      Media source,
                      String title,
                      String description)
                      throws FacebookException
Posts the video on a event's wall.

Parameters:
eventId - the ID of a event
source - video resource
title - video title
description - video description
Returns:
The new video ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Event#videos - Facebook Developers


Copyright © 2019. All rights reserved.