Ejemplo n.º 1
0
 /** @param args */
 public static void main(String[] args) {
   String access_token = args[0];
   Weibo weibo = new Weibo();
   weibo.setToken(access_token);
   Tags tm = new Tags();
   String ids = args[1];
   List<Tag> tags = null;
   try {
     tags = tm.destroyTagsBatch(ids);
     for (Tag t : tags) {
       Log.logInfo(t.toString());
     }
   } catch (WeiboException e) {
     e.printStackTrace();
   }
 }
Ejemplo n.º 2
0
 @Test
 public void testShowTags() {
   String access_token =
       "2.00d5evFEnhnsoBc45cd025fencuzbE"; // get token code from <code>OAuth4Code.java</code>
   String uid = "2552134982";
   Tags tm = new Tags();
   tm.client.setToken(access_token);
   try {
     List<Tag> wbTags = tm.getTags(uid);
     for (Tag tag : wbTags) {
       Log.logInfo(tag.toString());
     }
   } catch (WeiboException e) {
     e.printStackTrace();
   }
 }
Ejemplo n.º 3
0
 /**
  * 获取当前登录用户的收藏标签列表
  *
  * @param page
  * @return list of the favorite tags
  * @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/tags">favorites/tags</a>
  * @since JDK 1.5
  */
 public List<FavoritesTag> getFavoritesTags() throws WeiboException {
   return Tag.constructTag(
       Weibo.client.get(WeiboConfig.getValue("baseURL") + "favorites/tags.json"));
 }