Package weibo4j.examples.shorturl

Source Code of weibo4j.examples.shorturl.LocationOfUrl

package weibo4j.examples.shorturl;

import org.json.JSONObject;

import weibo4j.ShortUrl;
import weibo4j.model.WeiboException;

public class LocationOfUrl {

  /**
   * @param args
   */
  public static void main(String[] args) {
    String access_token = args[0];
    String url = args[1];
    ShortUrl su = new ShortUrl();
    su.client.setToken(access_token);
    try {
      JSONObject jo = su.locationsOfUrl(url);
      System.out.println(jo.toString());
    } catch (WeiboException e) {
      e.printStackTrace();
    }
  }

}
TOP

Related Classes of weibo4j.examples.shorturl.LocationOfUrl

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.