Package facebook4j.internal.http

Examples of facebook4j.internal.http.HttpResponse.asString()


    public boolean updatePageProfilePhoto(String pageId, Media source) throws FacebookException {
        ensureAuthorizationEnabled();
        List<HttpParameter> httpParams = new ArrayList<HttpParameter>();
        httpParams.add(source.asHttpParameter("source"));
        HttpResponse res = post(buildEndpoint(pageId, "picture"), httpParams.toArray(new HttpParameter[httpParams.size()]));
        return Boolean.valueOf(res.asString().trim());
    }

    public boolean updatePageCoverPhoto(PageCoverUpdate pageCoverUpdate) throws FacebookException {
        return updatePageCoverPhoto("me", pageCoverUpdate);
    }
View Full Code Here


        return updatePageCoverPhoto("me", pageCoverUpdate);
    }
    public boolean updatePageCoverPhoto(String pageId, PageCoverUpdate pageCoverUpdate) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = post(buildEndpoint(pageId), pageCoverUpdate.asHttpParameterArray());
        return Boolean.valueOf(res.asString().trim());
    }


    public ResponseList<PageSetting> getPageSettings() throws FacebookException {
        return getPageSettings("me");
View Full Code Here

        return updatePageSetting("me", pageSettingUpdate);
    }
    public boolean updatePageSetting(String pageId, PageSettingUpdate pageSettingUpdate) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = post(buildEndpoint(pageId, "settings"), pageSettingUpdate.asHttpParameterArray());
        return Boolean.valueOf(res.asString().trim());
    }

    public String postBackdatingFeed(BackdatingPostUpdate backdatingPostUpdate) throws FacebookException {
        return postBackdatingFeed("me", backdatingPostUpdate);
    }
View Full Code Here

    }

    public boolean deleteMilestone(String milestoneId) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = delete(buildEndpoint(milestoneId));
        return Boolean.valueOf(res.asString().trim());
    }

    public ResponseList<Admin> getPageAdmins() throws FacebookException {
        return getPageAdmins("me", null);
    }
View Full Code Here

        return installTab("me", appId);
    }
    public boolean installTab(String pageId, String appId) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = post(buildEndpoint(pageId, "tabs"), new HttpParameter[]{new HttpParameter("app_id", appId)});
        return Boolean.valueOf(res.asString().trim());
    }

    public boolean updateTab(String tabId, TabUpdate tabUpdate) throws FacebookException {
        return updateTab("me", tabId, tabUpdate);
    }
View Full Code Here

        return updateTab("me", tabId, tabUpdate);
    }
    public boolean updateTab(String pageId, String tabId, TabUpdate tabUpdate) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = post(buildEndpoint(pageId, "tabs/" + tabId), tabUpdate.asHttpParameterArray());
        return Boolean.valueOf(res.asString().trim());
    }

    public boolean deleteTab(String tabId) throws FacebookException {
        return deleteTab("me", tabId);
    }
View Full Code Here

        return deleteTab("me", tabId);
    }
    public boolean deleteTab(String pageId, String tabId) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = delete(buildEndpoint(pageId, "tabs/" + tabId));
        return Boolean.valueOf(res.asString().trim());
    }

    public boolean displayPagePost(String postId, boolean isHidden) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = post(buildEndpoint(postId), new HttpParameter[]{new HttpParameter("is_hidden", isHidden)});
View Full Code Here

    }

    public boolean displayPagePost(String postId, boolean isHidden) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = post(buildEndpoint(postId), new HttpParameter[]{new HttpParameter("is_hidden", isHidden)});
        return Boolean.valueOf(res.asString().trim());
    }

    public ResponseList<User> getBlocked() throws FacebookException {
        return getBlocked("me", null);
    }
View Full Code Here

        return unblock("me", userId);
    }
    public boolean unblock(String pageId, String userId) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = delete(buildEndpoint(pageId, "blocked"), new HttpParameter[]{new HttpParameter("uid", userId)});
        return Boolean.valueOf(res.asString().trim());
    }

    public ResponseList<Offer> getOffers() throws FacebookException {
        return getOffers("me", null);
    }
View Full Code Here

    }

    public boolean deleteOffer(String offerId) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = delete(buildEndpoint(offerId));
        return Boolean.valueOf(res.asString().trim());
    }

    public Offer getOffer(String offerId) throws FacebookException {
        return factory.createOffer(get(buildEndpoint(offerId)));
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.