Package facebook4j.internal.http

Examples of facebook4j.internal.http.HttpResponse


    public boolean deleteAchievement(URL achievementURL) throws FacebookException {
        return deleteAchievement("me", achievementURL);
    }
    public boolean deleteAchievement(String userId, URL achievementURL) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = delete(buildEndpoint(userId, "achievements"),
                            new HttpParameter[] {new HttpParameter("achievement", achievementURL.toString())});
        return Boolean.valueOf(res.asString().trim());
    }
View Full Code Here


        return _unlike(albumId);
    }

    public URL getAlbumCoverPhoto(String albumId) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = get(buildEndpoint(albumId, "picture"));
        try {
            return new URL(res.getResponseHeader("Location"));
        } catch (MalformedURLException urle) {
            throw new FacebookException(urle.getMessage(), urle);
        }
    }
View Full Code Here

    public Event getEvent(String eventId) throws FacebookException {
        return getEvent(eventId, null);
    }
    public Event getEvent(String eventId, Reading reading) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = get(buildEndpoint(eventId, reading));
        String resStr = res.asString().trim();
        if (resStr.equals("false")) {
            return null;
        }
        return factory.createEvent(res);
    }
View Full Code Here

        return factory.createEvent(res);
    }

    public boolean editEvent(String eventId, EventUpdate eventUpdate) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = post(buildEndpoint(eventId), eventUpdate.asHttpParameterArray());
        return Boolean.valueOf(res.asString().trim());
    }
View Full Code Here

        return Boolean.valueOf(res.asString().trim());
    }

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

        return factory.createRSVPStatusList(get(buildEndpoint(eventId, "invited/" + userId)));
    }

    public boolean inviteToEvent(String eventId, String userId) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = post(buildEndpoint(eventId, "invited/" + userId));
        return Boolean.valueOf(res.asString().trim());
    }
View Full Code Here

        HttpResponse res = post(buildEndpoint(eventId, "invited/" + userId));
        return Boolean.valueOf(res.asString().trim());
    }
    public boolean inviteToEvent(String eventId, String[] userIds) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = post(buildEndpoint(eventId, "invited"), new HttpParameter[] {
                                    new HttpParameter("users", z_F4JInternalStringUtil.join(userIds))});
        return Boolean.valueOf(res.asString().trim());
    }
View Full Code Here

        return Boolean.valueOf(res.asString().trim());
    }

    public boolean uninviteFromEvent(String eventId, String userId) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = delete(buildEndpoint(eventId, "invited/" + userId));
        return Boolean.valueOf(res.asString().trim());
    }
View Full Code Here

        return factory.createRSVPStatusList(get(buildEndpoint(eventId, "attending/" + userId)));
    }

    public boolean rsvpEventAsAttending(String eventId) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = post(buildEndpoint(eventId, "attending"));
        return Boolean.valueOf(res.asString().trim());
    }
View Full Code Here

        return factory.createRSVPStatusList(get(buildEndpoint(eventId, "maybe/" + userId)));
    }

    public boolean rsvpEventAsMaybe(String eventId) throws FacebookException {
        ensureAuthorizationEnabled();
        HttpResponse res = post(buildEndpoint(eventId, "maybe"));
        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.