【文件属性】:
文件名称:android新浪微博项目源代码
文件大小:2.56MB
文件格式:RAR
更新时间:2014-08-28 03:16:37
android java 新浪微博 项目
新浪微博实现源码。
配置之后可以真正使用。 个人需申请开发者KEY。这个需要看视频上如何申请。
新浪微博API(android版)
============================
本版本在java版的基础上修改,使其可以在android sdk上使用.
新增加了android的OAuth登陆认证及获取好友微博的实现样例.
常用接口实例:
(使用前先修改 Weibo.java 中
public static final String CONSUMER_KEY = "";
public static final String CONSUMER_SECRET = "";
填写成实际申请的 CONSUMER_KEY 及 CONSUMER_SECRET)
1、获取最新公共微博列表
参考:weibo4j.examples.GetTimelines 中的getPublicTimeline()部分
2、发表微博
参考:weibo4j.examples.Update 中的updateStatus(...)部分
3、发表评论
参考:weibo4j.examples.Update 中的updateComment(...)部分
4、删除评论
参考:weibo4j.examples.Update 中的destroyComment(...)部分
5、发送私人消息
参考:weibo4j.examples.DirectMessage 类
6、发表带图片的微博
参考:weibo4j.examples.OAuthUploadByFile 中的uploadStatus(status,file)部分
7、更新用户头像
参考:weibo4j.examples.OAuthUpdateProfile类
8、OAuth登陆认证
参考: andriodexamples 的demo.
=============================================================================
其他接口在weibo4j.Weibo类中定义,调用方式请参考weibo4j.examples,下面是完整的接口列表:
获取下行数据集(timeline)接口 方法名:
statuses/public_timeline 最新公共微博 方法名:getPublicTimeline
statuses/friends_timeline 最新关注人微博 (别名: statuses/home_timeline) 方法名:getFriendsTimeline
statuses/user_timeline 用户发表微博列表 方法名:getUserTimeline(String id, Paging paging)
statuses/mentions 最新 @用户的 方法名: getMentions()
statuses/comments 单条评论列表(按微博) 方法名:getComments()
微博访问接口
statuses/show 获取单条 方法名:showStatus(long id)
statuses/update 发表微博 方法名:updateStatus(String status)
statuses/upload 发表微博及图片 方法名:uploadStatus(String status,File file)
statuses/destroy 删除 方法名: destroyStatus(long statusId)
statuses/comment 评论 方法名: destroyComment(long commentId)
statuses/comment_destroy 删除评论 方法名:destroyComment
私信接口
direct_messages 我的私信列表 方法名:getDirectMessages() 分页 getDirectMessages(Paging paging)
direct_messages/sent 我发送的私信列表 方法名:getSentDirectMessages()
direct_messages/new 发送私信 方法名:sendDirectMessage(String id,String text)
direct_messages/destroy 删除一条私信 方法名:destroyDirectMessage(int id)
关注接口
friendships/create 关注某用户 方法名:createFriendship(String id)或 createFriendship(String id, boolean follow)
friendships/destroy 取消关注 方法名: destroyFriendship(String id)
friendships/exists 是否关注某用户 方法名:existsFriendship(String userA, String userB)
friends/ids 关注列表 方法名: getFriendsIDs(long cursor)
followers/ids 粉丝列表 方法名:getFollowersIDs(long cursor)
账号接口
account/verify_credentials 验证身份是否合法 方法名:verifyCredentials()
account/rate_limit_status 查看当前频率限制 方法名:rateLimitStatus()
account/update_profile_image 更改头像 方法名:updateProfileImage(File image)
account/update_profile 更改资料 方法名:User updateProfile(String name, String email, String url, String location, String description)
收藏接口
favorites 收藏列表 方法名:getFavorites()
favorites/create 添加收藏 方法名:createFavorite(long id)
favorites/destroy 删除收藏 方法名:destroyFavorite(long id)
网友评论
- 了解了大概,不过希望可以持续更新
- 还不错,参考用在项目开发中,谢谢了!
- 不是特别好
- 在手机上做程序,有点麻烦…
- 还是有很多值得借鉴的地方啊
- 还不错 初学者可以看看 借鉴借鉴
- 这个已经是比较老的了,现在 是4.0了,建议大家多看看新的教程.
- 还可以,可以借鉴
- 这一般般啦
- 比较简单,新手可以看看
- 不能用。部署上去全是错误
- 不知道,还没用过
- 一般般,不实用
- 自己写程序参考的
- 只有部分代码能参考,还不错
- 一般般,不实用
- 很有用,给我很大的帮助。。。
- 不能用,但是里面代码很多,没看,也许很有价值
- 乱的很,没什么用
- 还是得用它自己的的sdk改改 比较靠谱
- 一般,没感觉
- 部分的源码可以参考,还不错
- 用处不大,本来就是想看下微博里面的信息布局之类的
- 只有框架 有点失望
- 其实不怎么好
- 一般一般,部分源码可以参考
- 很有用,给我很大的帮助。。。
- 不是很好用啊
- 只有框架 有点失望
- 还可以,对新手有帮助,但内容不多