public static void main(String[] args) {
   String access_token = args[0];
   Favorite fm = new Favorite(access_token);
   String tid = args[1];
   try {
     List<Favorites> favors = fm.getFavoritesByTags(tid);
     for (Favorites s : favors) {
       Log.logInfo(s.toString());
     }
   } catch (WeiboException e) {
     e.printStackTrace();
   }
 }
Beispiel #2
0
 /**
  * 根据标签获取当前登录用户该标签下的收藏列表
  *
  * @param tid
  * @param page
  * @return list of the favorite Status
  * @throws WeiboException when Weibo service or network is unavailable
  * @version weibo4j-V2 1.0.0
  * @see <a href="http://open.weibo.com/wiki/2/favorites/show">favorites/show</a>
  * @since JDK 1.5
  */
 public List<Favorites> getFavoritesByTags(String tid, Paging page) throws WeiboException {
   return Favorites.constructFavorites(
       Weibo.client.get(
           WeiboConfig.getValue("baseURL") + "favorites/by_tags.json",
           new PostParameter[] {new PostParameter("tid", tid)},
           page));
 }
Beispiel #3
0
 /**
  * 获取当前登录用户的收藏列表
  *
  * @param page 、count
  * @return list of the Status
  * @throws WeiboException when Weibo service or network is unavailable
  * @version weibo4j-V2 1.0.1
  * @see <a href="http://open.weibo.com/wiki/2/favorites">favorites</a>
  * @since JDK 1.5
  */
 public List<Favorites> getFavorites(Paging page) throws WeiboException {
   return Favorites.constructFavorites(
       Weibo.client.get(WeiboConfig.getValue("baseURL") + "favorites.json", null, page));
 }