Package facebook4j.internal.http

Examples of facebook4j.internal.http.HttpResponse


        return factory.createNotificationList(res);
    }

    public boolean markNotificationAsRead(String notificationId) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = post(buildEndpoint(notificationId), new HttpParameter[] {new HttpParameter("unread", 0)});
        return Boolean.valueOf(res.asString().trim());
    }
View Full Code Here


    }
    public Page getPage(String pageId) throws FacebookException {
        return getPage(pageId, null);
    }
    public Page getPage(String pageId, Reading reading) throws FacebookException {
        HttpResponse res = get(buildEndpoint(pageId, reading));
        return factory.createPage(res);
    }
View Full Code Here

    public boolean updatePageBasicAttributes(PageUpdate pageUpdate) throws FacebookException {
        return updatePageBasicAttributes("me", pageUpdate);
    }
    public boolean updatePageBasicAttributes(String pageId, PageUpdate pageUpdate) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = post(buildEndpoint(pageId), pageUpdate.asHttpParameterArray());
        return Boolean.valueOf(res.asString().trim());
    }
View Full Code Here

    public boolean updatePageProfilePhoto(URL picture) throws FacebookException {
        return updatePageProfilePhoto("me", picture);
    }
    public boolean updatePageProfilePhoto(String pageId, URL picture) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = post(buildEndpoint(pageId, "picture"), new HttpParameter[]{new HttpParameter("picture", picture.toString())});
        return Boolean.valueOf(res.asString().trim());
    }
View Full Code Here

    }
    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());
    }
View Full Code Here

    public boolean updatePageCoverPhoto(PageCoverUpdate pageCoverUpdate) throws FacebookException {
        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());
    }
View Full Code Here

    public ResponseList<PageSetting> getPageSettings() throws FacebookException {
        return getPageSettings("me");
    }
    public ResponseList<PageSetting> getPageSettings(String pageId) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = get(buildEndpoint(pageId, "settings"));
        return factory.createPageSettingList(res);
    }
View Full Code Here

    public boolean updatePageSetting(PageSettingUpdate pageSettingUpdate) throws FacebookException {
        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());
    }
View Full Code Here

    public ResponseList<Page> getGlobalBrandChildren(String pageId) throws FacebookException {
        return getGlobalBrandChildren(pageId, null);
    }
    public ResponseList<Page> getGlobalBrandChildren(String pageId, Reading reading) throws FacebookException {
        HttpResponse res = get(buildEndpoint(pageId, "global_brand_children", reading));
        return factory.createPageList(res);
    }
View Full Code Here

        return getRawString("id", json);
    }

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

TOP

Related Classes of facebook4j.internal.http.HttpResponse

Copyright © 2018 www.massapicom. 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.