Package com.sola.instagram.io

Examples of com.sola.instagram.io.PostMethod.call()


    }

    args.put("action", actionString);
    String uri = uriConstructor.constructUri(UriFactory.Relationships.MUTATE_RELATIONSHIP, map, true);
    PostMethod post   = (new PostMethod(uri)).setPostParameters(args);
    JSONObject object = post.call().getJSON();
    return object.getJSONObject("meta").getInt("code") == 200;
  }

  public Comment postComment(String mediaId, String text) throws Exception {
    HashMap<String, Object> map  = new HashMap<String, Object>();
View Full Code Here


    map.put("media_id", mediaId);
    args.put("text", text);
    args.put("access_token", getAccessToken());
    String uri = uriConstructor.constructUri(UriFactory.Comments.POST_MEDIA_COMMENT, map, false);
    PostMethod post   = new PostMethod(uri).setPostParameters(args);
    JSONObject object = post.call().getJSON();
    return new Comment(object.getJSONObject("data"), getAccessToken());
  }

  public boolean removeComment(String mediaId, String commentId) throws Exception {
    HashMap<String, Object> map = new HashMap<String, Object>();
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.