2 ============================
3 本版本在java版的基础上修改,使其可以在android sdk上使用.
4 新增加了android的OAuth登陆认证及获取好友微博的实现样例.
9 public static final String CONSUMER_KEY = "";
10 public static final String CONSUMER_SECRET = "";
11 填写成实际申请的 CONSUMER_KEY 及 CONSUMER_SECRET)
14 参考:weibo4j.examples.GetTimelines 中的getPublicTimeline()部分
17 参考:weibo4j.examples.Update 中的updateStatus(...)部分
20 参考:weibo4j.examples.Update 中的updateComment(...)部分
23 参考:weibo4j.examples.Update 中的destroyComment(...)部分
26 参考:weibo4j.examples.DirectMessage 类
29 参考:weibo4j.examples.OAuthUploadByFile 中的uploadStatus(status,file)部分
32 参考:weibo4j.examples.OAuthUpdateProfile类
35 参考: andriodexamples 的demo.
40 =============================================================================
41 其他接口在weibo4j.Weibo类中定义,调用方式请参考weibo4j.examples,下面是完整的接口列表:
43 获取下行数据集(timeline)接口 方法名:
44 statuses/public_timeline 最新公共微博 方法名:getPublicTimeline
45 statuses/friends_timeline 最新关注人微博 (别名: statuses/home_timeline) 方法名:getFriendsTimeline
46 statuses/user_timeline 用户发表微博列表 方法名:getUserTimeline(String id, Paging paging)
47 statuses/mentions 最新 @用户的 方法名: getMentions()
48 statuses/comments 单条评论列表(按微博) 方法名:getComments()
51 statuses/show 获取单条 方法名:showStatus(long id)
53 statuses/update 发表微博 方法名:updateStatus(String status)
54 statuses/upload 发表微博及图片 方法名:uploadStatus(String status,File file)
55 statuses/destroy 删除 方法名: destroyStatus(long statusId)
57 statuses/comment 评论 方法名: destroyComment(long commentId)
58 statuses/comment_destroy 删除评论 方法名:destroyComment
61 direct_messages 我的私信列表 方法名:getDirectMessages() 分页 getDirectMessages(Paging paging)
62 direct_messages/sent 我发送的私信列表 方法名:getSentDirectMessages()
63 direct_messages/new 发送私信 方法名:sendDirectMessage(String id,String text)
64 direct_messages/destroy 删除一条私信 方法名:destroyDirectMessage(int id)
66 friendships/create 关注某用户 方法名:createFriendship(String id)或 createFriendship(String id, boolean follow)
67 friendships/destroy 取消关注 方法名: destroyFriendship(String id)
68 friendships/exists 是否关注某用户 方法名:existsFriendship(String userA, String userB)
70 friends/ids 关注列表 方法名: getFriendsIDs(long cursor)
71 followers/ids 粉丝列表 方法名:getFollowersIDs(long cursor)
73 account/verify_credentials 验证身份是否合法 方法名:verifyCredentials()
74 account/rate_limit_status 查看当前频率限制 方法名:rateLimitStatus()
76 account/update_profile_image 更改头像 方法名:updateProfileImage(File image)
77 account/update_profile 更改资料 方法名:User updateProfile(String name, String email, String url, String location, String description)
80 favorites 收藏列表 方法名:getFavorites()
81 favorites/create 添加收藏 方法名:createFavorite(long id)
82 favorites/destroy 删除收藏 方法名:destroyFavorite(long id)