Package weibo4j

Examples of weibo4j.Weibo


public class QueryMid {

  public static void main(String[] args) {
    String access_token = args[0];
    String id = args[1];
    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    Timeline tm = new Timeline();
    try {
      JSONObject mid = tm.QueryMid( 1, id);
        Log.logInfo(mid.toString());     
    } catch (WeiboException e) {
View Full Code Here


public class Repost {

  public static void main(String[] args) {
    String access_token = args[0];
    String id =  args[1];
    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    Timeline tm = new Timeline();
    try {
      Status status = tm.Repost(id);
      Log.logInfo(status.toString());
    } catch (WeiboException e) {
View Full Code Here

import weibo4j.org.json.JSONObject;

public class GetUserTimelineIds {
  public static void main(String[] args) {
    String access_token = args[0];
    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    Timeline tm = new Timeline();
    try {
      JSONObject ids = tm.getUserTimelineIdsByUid( args[1]);
      Log.logInfo(ids.toString());
    } catch (WeiboException e) {
View Full Code Here

public class GetRepostTimeline {

  public static void main(String[] args) {
    String access_token = args[0];
    String id = args[1];
    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    Timeline tm = new Timeline();
    try {
      StatusWapper status = tm.getRepostTimeline(id);
      for(Status s : status.getStatuses()){
        Log.logInfo(s.toString());
View Full Code Here

public class GetFriendsTimelineIds {

  public static void main(String[] args) {
    String access_token = args[0];
    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    Timeline tm = new Timeline();
    try {
      JSONObject status = tm.getFriendsTimelineIds();
      Log.logInfo(status.toString());
    } catch (WeiboException e) {
View Full Code Here

public class QueryId {

  public static void main(String[] args) {
    String access_token = args[0];
    String mid =  args[1];
    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    Timeline tm = new Timeline();   
    try {
      JSONObject id = tm.QueryId( mid, 1,1);
        Log.logInfo(String.valueOf(id));     
    } catch (WeiboException e) {
View Full Code Here


public class Upload {
  public static void main(String args[]){
    try{
      Weibo weibo = new Weibo();
      weibo.setToken(args[0]);
      try{
        byte[] content= readFileImage("psu.jpg");
        System.out.println("content length:" + content.length);
        ImageItem pic=new ImageItem("pic",content);
View Full Code Here

public class GetPublicTimeline {

  public static void main(String[] args) {
    String access_token = args[0];
    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    Timeline tm = new Timeline();
    try {
      StatusWapper status = tm.getPublicTimeline();
      for(Status s : status.getStatuses()){
        Log.logInfo(s.toString());
View Full Code Here

public class GetUserTimeline {

  public static void main(String[] args) {
    String access_token = args[0];
    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    Timeline tm = new Timeline();
    try {
      StatusWapper status = tm.getUserTimeline();
      for(Status s : status.getStatuses()){
        Log.logInfo(s.toString());
View Full Code Here

import weibo4j.org.json.JSONArray;

public class GetRepostWeekly {
  public static void main(String[] args) {
    String access_token = args[0];
    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    Timeline tm = new Timeline();
    try {
      JSONArray status = tm.getRepostWeekly();
      Log.logInfo(status.toString());
View Full Code Here

TOP

Related Classes of weibo4j.Weibo

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.