Package facebook4j.internal.http

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


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

    /* Activity Methods */
   
    public ResponseList<Activity> getActivities() throws FacebookException {
View Full Code Here


        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

    }

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

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

    }

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

    public String postEventLink(String eventId, URL link) throws FacebookException {
        return postEventLink(eventId, link, null);
    }
View Full Code Here

    }

    public boolean inviteToEvent(String eventId, String userId) throws FacebookException {
        ensureAuthorizationEnabled();
        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))});
View Full Code Here

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

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

    }

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

    public ResponseList<RSVPStatus> getRSVPStatusInAttending(String eventId) throws FacebookException {
        ensureAuthorizationEnabled();
        return factory.createRSVPStatusList(get(buildEndpoint(eventId, "attending")));
View Full Code Here

    }

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

    public ResponseList<RSVPStatus> getRSVPStatusInMaybe(String eventId) throws FacebookException {
        ensureAuthorizationEnabled();
        return factory.createRSVPStatusList(get(buildEndpoint(eventId, "maybe")));
View Full Code Here

    }

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

    public ResponseList<RSVPStatus> getRSVPStatusInDeclined(String eventId) throws FacebookException {
        ensureAuthorizationEnabled();
        return factory.createRSVPStatusList(get(buildEndpoint(eventId, "declined")));
View Full Code Here

    }

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

    public URL getEventPictureURL(String eventId) throws FacebookException {
        return getEventPictureURL(eventId, null);
    }
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.