All Downloads are FREE. Search and download functionalities are using the official Maven repository.

facebook4j.api.PageMethods Maven / Gradle / Ivy

There is a newer version: 2.4.13
Show newest version
/*
 * Copyright 2012 Ryuji Yamashita
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package facebook4j.api;

import facebook4j.Admin;
import facebook4j.BackdatingPostUpdate;
import facebook4j.FacebookException;
import facebook4j.Insight;
import facebook4j.Like;
import facebook4j.Media;
import facebook4j.Milestone;
import facebook4j.MilestoneUpdate;
import facebook4j.Offer;
import facebook4j.OfferUpdate;
import facebook4j.Page;
import facebook4j.PageCoverUpdate;
import facebook4j.PagePhotoUpdate;
import facebook4j.PageSetting;
import facebook4j.PageSettingUpdate;
import facebook4j.PageUpdate;
import facebook4j.PictureSize;
import facebook4j.Post;
import facebook4j.Reading;
import facebook4j.ResponseList;
import facebook4j.Tab;
import facebook4j.TabUpdate;
import facebook4j.Tagged;
import facebook4j.User;

import java.net.URL;
import java.util.List;
import java.util.Map;

/**
 * @author Ryuji Yamashita - roundrop at gmail.com
 * @since Facebook4J 2.0.0
 */
public interface PageMethods {
    /**
     * Returns the current page.
     * @return page
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page - Facebook Developers
     */
    Page getPage() throws FacebookException;

    /**
     * Returns the current page.
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers
     * @return page
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page - Facebook Developers
     */
    Page getPage(Reading reading) throws FacebookException;

    /**
     * Returns the page.
     * @param pageId the ID of the page
     * @return page
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page - Facebook Developers
     */
    Page getPage(String pageId) throws FacebookException;

    /**
     * Returns the page.
     * @param pageId the ID of the page
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers
     * @return page
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page - Facebook Developers
     */
    Page getPage(String pageId, Reading reading) throws FacebookException;

    /**
     * Returns the url of a page's profile picture.
     * This method requires page access_token.
     * @return url
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page - Facebook Developers - Connections - picture
     */
    URL getPagePictureURL() throws FacebookException;

    /**
     * Returns the url of a page's profile picture.
     * This method requires page access_token.
     * @param size {@link facebook4j.PictureSize picture size}
     * @return url
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page - Facebook Developers - Connections - picture
     */
    URL getPagePictureURL(PictureSize size) throws FacebookException;

    /**
     * Returns the url of a page's profile picture.
     * @param pageId the ID of a page
     * @return url
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page - Facebook Developers - Connections - picture
     */
    URL getPagePictureURL(String pageId) throws FacebookException;

    /**
     * Returns the url of a page's profile picture.
     * @param pageId the ID of a page
     * @param size {@link facebook4j.PictureSize picture size}
     * @return url
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page - Facebook Developers - Connections - picture
     */
    URL getPagePictureURL(String pageId, PictureSize size) throws FacebookException;

    /**
     * Returns the current Page's own posts, including unpublished and scheduled posts.
     * This method requires page access_token.
     * @return posts
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page - Facebook Developers
     */
    ResponseList getPromotablePosts() throws FacebookException;

    /**
     * Returns the current Page's own posts, including unpublished and scheduled posts.
     * This method requires page access_token.
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers
     * @return posts
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page - Facebook Developers
     */
    ResponseList getPromotablePosts(Reading reading) throws FacebookException;

    /**
     * Returns the Page's own posts, including unpublished and scheduled posts.
     * @param pageId the ID of the page
     * @return posts
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page - Facebook Developers
     */
    ResponseList getPromotablePosts(String pageId) throws FacebookException;

    /**
     * Returns the Page's own posts, including unpublished and scheduled posts.
     * @param pageId the ID of the page
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers
     * @return posts
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page - Facebook Developers
     */
    ResponseList getPromotablePosts(String pageId, Reading reading) throws FacebookException;

    /**
     * Updates a Page's basic attributes.
     * @param pageUpdate the page to be updated
     * @return true if update is successful
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#attributes - Facebook Developers
     */
    boolean updatePageBasicAttributes(PageUpdate pageUpdate) throws FacebookException;

    /**
     * Updates a Page's basic attributes.
     * @param pageId the ID of the page
     * @param pageUpdate the page to be updated
     * @return true if update is successful
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#attributes - Facebook Developers
     */
    boolean updatePageBasicAttributes(String pageId, PageUpdate pageUpdate) throws FacebookException;

    /**
     * Updates the profile photo for the current Page.
     * @param picture A URL to the photo
     * @return true if update is successful
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#attributes - Facebook Developers - Setting a Page Profile Photo
     */
    boolean updatePageProfilePhoto(URL picture) throws FacebookException;

    /**
     * Updates the profile photo for a Page.
     * @param pageId the ID of the page
     * @param picture A URL to the photo
     * @return true if update is successful
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#attributes - Facebook Developers - Setting a Page Profile Photo
     */
    boolean updatePageProfilePhoto(String pageId, URL picture) throws FacebookException;

    /**
     * Updates the profile photo for the current Page.
     * @param source Photo content
     * @return true if update is successful
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#attributes - Facebook Developers - Setting a Page Profile Photo
     */
    boolean updatePageProfilePhoto(Media source) throws FacebookException;

    /**
     * Updates the profile photo for a Page.
     * @param pageId the ID of the page
     * @param source Photo content
     * @return true if update is successful
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#attributes - Facebook Developers - Setting a Page Profile Photo
     */
    boolean updatePageProfilePhoto(String pageId, Media source) throws FacebookException;

    /**
     * Updates the profile photo for the current page.
     * @param pageCoverUpdate the cover photo for the page to be updated
     * @return true if update is successful
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#attributes - Facebook Developers - Setting a Cover Photo
     */
    boolean updatePageCoverPhoto(PageCoverUpdate pageCoverUpdate) throws FacebookException;

    /**
     * Updates the profile photo for the current page.
     * @param pageId the ID of the page
     * @param pageCoverUpdate the cover photo for the page to be updated
     * @return true if update is successful
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#attributes - Facebook Developers - Setting a Cover Photo
     */
    boolean updatePageCoverPhoto(String pageId, PageCoverUpdate pageCoverUpdate) throws FacebookException;

    /**
     * Hides/Shows the page's post that is published by a non-admin user.
     * @param postId the ID of the post in the page
     * @param isHidden whether a post is hidden
     * @return true if hide/show is successful
     * @see Page#attributes - Facebook Developers - Hiding a Page Post
     */
    boolean displayPagePost(String postId, boolean isHidden) throws FacebookException;

    /**
     * Returns the settings for the current page.
     * @return settings
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page - Facebook Developers
     */
    ResponseList getPageSettings() throws FacebookException;

    /**
     * Returns the settings for the page.
     * @param pageId the ID of the page
     * @return settings
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page - Facebook Developers
     */
    ResponseList getPageSettings(String pageId) throws FacebookException;

    /**
     * Updates the setting for the current page.
     * @param pageSettingUpdate setting
     * @return true if the setting was successfully set or changed
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#settings - Facebook Developers
     */
    boolean updatePageSetting(PageSettingUpdate pageSettingUpdate) throws FacebookException;

    /**
     * Updates the setting for the page.
     * @param pageId the ID of the page
     * @param pageSettingUpdate setting
     * @return true if the setting was successfully set or changed
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#settings - Facebook Developers
     */
    boolean updatePageSetting(String pageId, PageSettingUpdate pageSettingUpdate) throws FacebookException;

    /**
     * Creates the post that's back-dated to the current page's wall.
     * @param backdatingPostUpdate the post to be created
     * @return The new post ID
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#backdating - Facebook Developers
     */
    String postBackdatingFeed(BackdatingPostUpdate backdatingPostUpdate) throws FacebookException;

    /**
     * Creates the post that's back-dated to a page's wall.
     * @param pageId the ID of a page
     * @param backdatingPostUpdate the post to be created
     * @return The new post ID
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#backdating - Facebook Developers
     */
    String postBackdatingFeed(String pageId, BackdatingPostUpdate backdatingPostUpdate) throws FacebookException;

    /**
     * Posts a photo to the current page's wall.
     * @param pagePhotoUpdate photo content, targeting and more
     * @return The new photo ID
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#photos - Facebook Developers
     */
    String postPagePhoto(PagePhotoUpdate pagePhotoUpdate) throws FacebookException;

    /**
     * Posts a photo to a page's wall.
     * @param pageId the ID of a page
     * @param pagePhotoUpdate photo content, targeting and more
     * @return The new photo ID
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#photos - Facebook Developers
     */
    String postPagePhoto(String pageId, PagePhotoUpdate pagePhotoUpdate) throws FacebookException;

    /**
     * Returns all children pages of a specific page.
     * @param pageId the ID of the page
     * @return pages
     * @throws FacebookException
     */
    ResponseList getGlobalBrandChildren(String pageId) throws FacebookException;

    /**
     * Returns all children pages of a specific page.
     * @param pageId the ID of the page
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers
     * @return pages
     * @throws FacebookException
     */
    ResponseList getGlobalBrandChildren(String pageId, Reading reading) throws FacebookException;

    /**
     * Returns the page's insights data.
     * @param pageId the ID of the page
     * @return insights
     * @throws FacebookException
     */
    ResponseList getPageInsights(String pageId) throws FacebookException;

    /**
     * Returns the page's insights data.
     * @param pageId the ID of the page
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers
     * @return pages
     * @throws FacebookException
     */
    ResponseList getPageInsights(String pageId, Reading reading) throws FacebookException;

    /**
     * Returns the photos, videos, and posts in which the Page has been tagged.
     * @param pageId the ID of the page
     * @return pages
     * @throws FacebookException
     */
    ResponseList getPageTagged(String pageId) throws FacebookException;

    /**
     * Returns the photos, videos, and posts in which the Page has been tagged.
     * @param pageId the ID of the page
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers
     * @return pages
     * @throws FacebookException
     */
    ResponseList getPageTagged(String pageId, Reading reading) throws FacebookException;

    /**
     * Returns a list of the Page's milestones.
     * Note that this method requires 'page' access_token.
     * @return milestones
     * @throws FacebookException when Facebook service or network is unavailable
     */
    ResponseList getMilestones() throws FacebookException;

    /**
    /**
     * Returns a list of the Page's milestones.
     * Note that this method requires 'page' access_token.
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers
     * @return milestones
     * @throws FacebookException when Facebook service or network is unavailable
     */
    ResponseList getMilestones(Reading reading) throws FacebookException;

    /**
     * Returns a list of the Page's milestones.
     * @param pageId the ID of the page
     * @return milestones
     * @throws FacebookException when Facebook service or network is unavailable
     */
    ResponseList getMilestones(String pageId) throws FacebookException;

    /**
     * Returns a list of the Page's milestones.
     * @param pageId the ID of the page
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers
     * @return milestones
     * @throws FacebookException when Facebook service or network is unavailable
     */
    ResponseList getMilestones(String pageId, Reading reading) throws FacebookException;

    /**
     * Creates the milestone for the current page.
     * Note that this method requires 'page' access_token.
     * @param milestoneUpdate a milestone to be created
     * @return The new milestone ID
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#milestones - Facebook Developers
     */
    String createMilestone(MilestoneUpdate milestoneUpdate) throws FacebookException;

    /**
     * Creates the milestone for the page.
     * Note that this method requires 'page' access_token.
     * @param pageId the ID of the page
     * @param milestoneUpdate a milestone to be created
     * @return The new milestone ID
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#milestones - Facebook Developers
     */
    String createMilestone(String pageId, MilestoneUpdate milestoneUpdate) throws FacebookException;

    /**
     * Deletes the milestone.
     * Note that this method requires 'page' access_token.
     * @param milestoneId the ID of a milestone
     * @return true if delete is successful
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#milestones - Facebook Developers
     */
    boolean deleteMilestone(String milestoneId) throws FacebookException;

    /**
     * Returns a list of the Page's Admins.
     * Note that this method requires 'page' access_token.
     * @return admins
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page - Facebook Developers
     */
    ResponseList getPageAdmins() throws FacebookException;

    /**
     * Returns a list of the Page's Admins.
     * Note that this method requires 'page' access_token.
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers
     * @return admins
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page - Facebook Developers
     */
    ResponseList getPageAdmins(Reading reading) throws FacebookException;

    /**
     * Returns a list of the Page's Admins.
     * Note that this method requires 'page' access_token.
     * @param pageId the ID of the page
     * @return admins
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page - Facebook Developers
     */
    ResponseList getPageAdmins(String pageId) throws FacebookException;

    /**
     * Returns a list of the Page's Admins.
     * Note that this method requires 'page' access_token.
     * @param pageId the ID of the page
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers
     * @return admins
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page - Facebook Developers
     */
    ResponseList getPageAdmins(String pageId, Reading reading) throws FacebookException;

    /**
     * Returns the current Page's profile tabs.
     * Note that this method requires 'page' access_token.
     * @return tabs
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#tabs - Facebook Developers
     */
    ResponseList getTabs() throws FacebookException;

    /**
     * Returns the current Page's profile tabs.
     * Note that this method requires 'page' access_token.
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers
     * @return tabs
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#tabs - Facebook Developers
     */
    ResponseList getTabs(Reading reading) throws FacebookException;

    /**
     * Returns the Page's profile tabs.
     * Note that this method requires 'page' access_token.
     * @param pageId the ID of the page
     * @return tabs
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#tabs - Facebook Developers
     */
    ResponseList getTabs(String pageId) throws FacebookException;

    /**
     * Returns the Page's profile tabs.
     * Note that this method requires 'page' access_token.
     * @param pageId the ID of the page
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers
     * @return tabs
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#tabs - Facebook Developers
     */
    ResponseList getTabs(String pageId, Reading reading) throws FacebookException;

    /**
     * Returns the current Page's profile tabs if a specific app is installed.
     * @param appIds the IDs of app
     * @return tabs
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#tabs - Facebook Developers
     */
    ResponseList getInstalledTabs(List appIds) throws FacebookException;

    /**
     * Returns the current Page's profile tabs if a specific app is installed.
     * @param appIds the IDs of app
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers
     * @return tabs
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#tabs - Facebook Developers
     */
    ResponseList getInstalledTabs(List appIds, Reading reading) throws FacebookException;

    /**
     * Returns the Page's profile tabs if a specific app is installed.
     * @param pageId the ID of the page
     * @param appIds the IDs of app
     * @return tabs
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#tabs - Facebook Developers
     */
    ResponseList getInstalledTabs(String pageId, List appIds) throws FacebookException;

    /**
     * Returns the Page's profile tabs if a specific app is installed.
     * @param pageId the ID of the page
     * @param appIds the IDs of app
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers
     * @return tabs
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#tabs - Facebook Developers
     */
    ResponseList getInstalledTabs(String pageId, List appIds, Reading reading) throws FacebookException;

    /**
     * Installs a profile_tab at the end of the current list of installed tabs for the current page.
     * @param appId the ID of the application for which to install the tab
     * @return true if install is successful
     * @see Page#tabs - Facebook Developers
     */
    boolean installTab(String appId) throws FacebookException;

    /**
     * Installs a profile_tab at the end of the current list of installed tabs for the current page.
     * @param pageId the ID of the page
     * @param appId the ID of the application for which to install the tab
     * @return true if install is successful
     * @see Page#tabs - Facebook Developers
     */
    boolean installTab(String pageId, String appId) throws FacebookException;

    /**
     * Updates an installed profile_tab for the current page.
     * @param tabId the ID of the tab
     * @param tabUpdate tab to be updated
     * @return true if the update is successful
     * @see Page#tabs - Facebook Developers
     */
    boolean updateTab(String tabId, TabUpdate tabUpdate) throws FacebookException;

    /**
     * Updates an installed profile_tab for the page.
     * @param pageId the ID of the page
     * @param tabId the ID of the tab
     * @param tabUpdate tab to be updated
     * @return true if the update is successful
     * @see Page#tabs - Facebook Developers
     */
    boolean updateTab(String pageId, String tabId, TabUpdate tabUpdate) throws FacebookException;

    /**
     * Deletes an installed profile_tab where is_permanent is not true for the current page.
     * @param tabId the ID of the tab
     * @return true if the delete is successful
     * @throws FacebookException
     */
    boolean deleteTab(String tabId) throws FacebookException;

    /**
     * Deletes an installed profile_tab where is_permanent is not true for the page.
     * @param pageId the ID of the page
     * @param tabId the ID of the tab
     * @return true if the delete is successful
     * @throws FacebookException
     */
    boolean deleteTab(String pageId, String tabId) throws FacebookException;

    /**
     * Returns a list of users blocked from the current Page.
     * @return users
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#blocked - Facebook Developers
     */
    ResponseList getBlocked() throws FacebookException;

    /**
     * Returns a list of users blocked from the current Page.
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers
     * @return users
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#blocked - Facebook Developers
     */
    ResponseList getBlocked(Reading reading) throws FacebookException;

    /**
     * Returns a list of users blocked from the Page.
     * @param pageId the ID of the page
     * @return users
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#blocked - Facebook Developers
     */
    ResponseList getBlocked(String pageId) throws FacebookException;

    /**
     * Returns a list of users blocked from the Page.
     * @param pageId the ID of the page
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers
     * @return users
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#blocked - Facebook Developers
     */
    ResponseList getBlocked(String pageId, Reading reading) throws FacebookException;

    /**
     * Blocks users from posting content to the current page.
     * @param userIds user IDs you wish to block
     * @return Map where the keys are the user IDs and the values a boolean of whether or not the block was successful
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#blocked - Facebook Developers
     */
    Map block(List userIds) throws FacebookException;

    /**
     * Blocks users from posting content to the current page.
     * @param pageId the ID of the page
     * @param userIds user IDs you wish to block
     * @return Map where the keys are the user IDs and the values a boolean of whether or not the block was successful
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#blocked - Facebook Developers
     */
    Map block(String pageId, List userIds) throws FacebookException;

    /**
     * Unblocks the blocked user for the current page.
     * @param userId the IDs of the user
     * @return true if unblock is successful
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#blocked - Facebook Developers
     */
    boolean unblock(String userId) throws FacebookException;

    /**
     * Unblocks the blocked user for the page.
     * @param pageId the ID of the page
     * @param userId the IDs of the user
     * @return true if unblock is successful
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#blocked - Facebook Developers
     */
    boolean unblock(String pageId, String userId) throws FacebookException;

    /**
     * Returns a list of offers of the current page.
     * @return offers
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#offers - Facebook Developers
     */
    ResponseList getOffers() throws FacebookException;

    /**
     * Returns a list of offers of the current page.
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers
     * @return offers
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#offers - Facebook Developers
     */
    ResponseList getOffers(Reading reading) throws FacebookException;

    /**
     * Returns a list of offers of the current page.
     * @param pageId the ID of the page
     * @return offers
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#offers - Facebook Developers
     */
    ResponseList getOffers(String pageId) throws FacebookException;

    /**
     * Returns a list of offers of the current page.
     * @param pageId the ID of the page
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers
     * @return offers
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#offers - Facebook Developers
     */
    ResponseList getOffers(String pageId, Reading reading) throws FacebookException;

    /**
     * Creates an offer for the current page.
     * @param offerUpdate a createOffer to be created
     * @return The new createOffer ID
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#offers - Facebook Developers
     */
    String createOffer(OfferUpdate offerUpdate) throws FacebookException;

    /**
     * Creates an offers for the page.
     * @param pageId the ID of the page
     * @param offerUpdate a createOffer to be created
     * @return The new createOffer ID
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page#offers - Facebook Developers
     */
    String createOffer(String pageId, OfferUpdate offerUpdate) throws FacebookException;

    /**
     * Deletes the createOffer.
     * @param offerId the ID of the createOffer
     * @return true if delete is successful
     * @throws FacebookException
     */
    boolean deleteOffer(String offerId) throws FacebookException;

    /**
     * Returns the offer.
     * @param offerId the ID of the offer
     * @return offer
     * @throws FacebookException when Facebook service or network is unavailable
     */
    Offer getOffer(String offerId) throws FacebookException;

    /**
     * Returns a specific page that the current user has liked.
     * @param pageId the ID of a page
     * @return page
     * @throws FacebookException when Facebook service or network is unavailable
     * @see User#likes - Facebook Developers
     */
    Page getLikedPage(String pageId) throws FacebookException;

    /**
     * Returns a specific page that the current user has liked.
     * @param pageId the ID of a page
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers
     * @return page
     * @throws FacebookException when Facebook service or network is unavailable
     * @see User#likes - Facebook Developers
     */
    Page getLikedPage(String pageId, Reading reading) throws FacebookException;

    /**
     * Returns a specific page that a user has liked.
     * @param userId the ID of a user
     * @param pageId the ID of a page
     * @return page
     * @throws FacebookException when Facebook service or network is unavailable
     * @see User#likes - Facebook Developers
     */
    Page getLikedPage(String userId, String pageId) throws FacebookException;

    /**
     * Returns a specific page that a user has liked.
     * @param userId the ID of a user
     * @param pageId the ID of a page
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers
     * @return page
     * @throws FacebookException when Facebook service or network is unavailable
     * @see User#likes - Facebook Developers
     */
    Page getLikedPage(String userId, String pageId, Reading reading) throws FacebookException;

    /**
     * Returns likes made by the page.
     * @param pageId the ID of a page
     * @return likes
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page Likes - Facebook Developers
     */
    ResponseList getPageLikes(String pageId) throws FacebookException;

    /**
     * Returns likes made by the page.
     * @param pageId the ID of a page
     * @param reading optional reading parameters. see Graph API#reading - Facebook Developers see Graph API#reading - Facebook Developers
     * @return likes
     * @throws FacebookException when Facebook service or network is unavailable
     * @see Page Likes - Facebook Developers
     */
    ResponseList getPageLikes(String pageId, Reading reading) throws FacebookException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy