Package facebook4j.internal.http

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


    public boolean updateEventPicture(String eventId, Media source) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = post(buildEndpoint(eventId, "picture"),
                                new HttpParameter[] {source.asHttpParameter("source")});
        return Boolean.valueOf(res.asString().trim());
    }

    public boolean deleteEventPicture(String eventId) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = delete(buildEndpoint(eventId, "picture"));
View Full Code Here


    }

    public boolean deleteEventPicture(String eventId) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = delete(buildEndpoint(eventId, "picture"));
        return Boolean.valueOf(res.asString().trim());
    }

    public ResponseList<Photo> getEventPhotos(String eventId) throws FacebookException {
        return getEventPhotos(eventId, null);
    }
View Full Code Here

    }

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

    public ResponseList<Comment> getPostComments(String postId) throws FacebookException {
        return getPostComments(postId, null);
    }
View Full Code Here

        return getRawString("id", json);
    }
    public boolean deleteFriendlist(String friendlistId) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = delete(buildEndpoint(friendlistId));
        return Boolean.valueOf(res.asString().trim());
    }

    public boolean addFriendlistMember(String friendlistId, String userId) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = post(buildEndpoint(friendlistId + "/members/" + userId));
View Full Code Here

    }

    public boolean addFriendlistMember(String friendlistId, String userId) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = post(buildEndpoint(friendlistId + "/members/" + userId));
        return Boolean.valueOf(res.asString().trim());
    }

    public boolean removeFriendlistMember(String friendlistId, String userId) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = delete(buildEndpoint(friendlistId + "/members/" + userId));
View Full Code Here

    }

    public boolean removeFriendlistMember(String friendlistId, String userId) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = delete(buildEndpoint(friendlistId + "/members/" + userId));
        return Boolean.valueOf(res.asString().trim());
    }

    public boolean deleteFriendlistMember(String friendlistId, String userId) throws FacebookException {
        return removeFriendlistMember(friendlistId, userId);
    }
View Full Code Here

        return factory.createComment(get(buildEndpoint(commentId)));
    }
    public boolean deleteComment(String commentId) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = delete(buildEndpoint(commentId));
        return Boolean.valueOf(res.asString().trim());
    }

    public ResponseList<Like> getCommentLikes(String commentId) throws FacebookException {
        return getCommentLikes(commentId, null);
    }
View Full Code Here

    }

    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());
    }

    /* Page Methods */

    public Page getPage() throws FacebookException {
View Full Code Here

        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());
    }

    public boolean updatePageProfilePhoto(URL picture) throws FacebookException {
        return updatePageProfilePhoto("me", picture);
    }
View Full Code Here

        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());
    }

    public boolean updatePageProfilePhoto(Media source) throws FacebookException {
        return updatePageProfilePhoto("me", source);
    }
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.