Ejemplo n.º 1
0
 /**
  * 关注一个用户
  *
  * @param map 参数列表
  * @return
  * @throws WeiboException when Weibo service or network is unavailable
  * @version weibo4j-V2 1.0.2
  * @see http://open.weibo.com/wiki/2/friendships/create
  * @since JDK 1.5
  */
 public User createFriendships(Map<String, String> map) throws WeiboException {
   PostParameter[] parList = ArrayUtils.mapToArray(map);
   return new User(
       client
           .post(
               WeiboConfig.getValue("baseURL") + "friendships/create.json", parList, access_token)
           .asJSONObject());
 }
Ejemplo n.º 2
0
 /**
  * 获取当前登录用户的关注人中又关注了指定用户的用户列表
  *
  * @param map 参数列表
  * @return
  * @throws WeiboException when Weibo service or network is unavailable
  * @version weibo4j-V2 1.0.2
  * @see http://open.weibo.com/wiki/2/friendships/friends_chain/followers
  * @since JDK 1.5
  */
 public UserWapper getFriendsChainFollowers(Map<String, String> map) throws WeiboException {
   PostParameter[] parList = ArrayUtils.mapToArray(map);
   return User.constructWapperUsers(
       client.get(
           WeiboConfig.getValue("baseURL") + "friendships/friends_chain/followers.json",
           parList,
           access_token));
 }
Ejemplo n.º 3
0
 /**
  * 获取用户粉丝的用户UID列表
  *
  * @param map 参数列表
  * @return
  * @throws WeiboException when Weibo service or network is unavailable
  * @version weibo4j-V2 1.0.2
  * @see http://open.weibo.com/wiki/2/friendships/followers/ids
  * @since JDK 1.5
  */
 public String[] getFollowersIdsByName(Map<String, String> map) throws WeiboException {
   PostParameter[] parList = ArrayUtils.mapToArray(map);
   return User.constructIds(
       client.get(
           WeiboConfig.getValue("baseURL") + "friendships/followers/ids.json",
           parList,
           access_token));
 }
Ejemplo n.º 4
0
 /**
  * 获取两个用户之间的详细关注关系情况
  *
  * @param map 参数列表
  * @return
  * @throws WeiboException when Weibo service or network is unavailable
  * @version weibo4j-V2 1.0.2
  * @see http://open.weibo.com/wiki/2/friendships/show
  * @since JDK 1.5
  */
 public JSONObject getFriendships(Map<String, String> map) throws WeiboException {
   PostParameter[] parList = ArrayUtils.mapToArray(map);
   return client
       .get(WeiboConfig.getValue("baseURL") + "friendships/show.json", parList, access_token)
       .asJSONObject();
 }