Package com.sola.instagram.io

Examples of com.sola.instagram.io.PostMethod


      postArgs.put("scope", getScope());
    }
    postArgs.put("code", code);

   
      JSONObject response = (new PostMethod() .setPostParameters(postArgs)
      .setMethodURI(UriFactory.Auth.GET_ACCESS_TOKEN) ).call().getJSON();
    
    try {
      setAccessToken(new
          AccessToken(response.getString("access_token")));
View Full Code Here


      break;
    }

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

    HashMap<String, Object> args = new HashMap<String, Object>();
    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());
  }
View Full Code Here

    HashMap<String, Object> map  = new HashMap<String, Object>();
    HashMap<String, Object> args = new HashMap<String, Object>();
    map.put("media_id", mediaId);
    args.put("access_token", getAccessToken());
    String uri = uriConstructor.constructUri(UriFactory.Likes.SET_LIKE, map, false);
    JSONObject object = (new PostMethod(uri).setPostParameters(args)).call().getJSON();
    return object.getJSONObject("meta").getInt("code") == 200;
  }
View Full Code Here

TOP

Related Classes of com.sola.instagram.io.PostMethod

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.