新浪微博Android开发(四)

搭建程序整体框架,实现登录功能

1、使用MVC搭建程序框架,方便后续功能添加

2、实现登录功能

  登录验证在微博接口中已封装好,调用verifyCredentials方法,就好了。

Basic Aath:

weibo.setUserId(name);
weibo.setPassword(password);

User u
= weibo.verifyCredentials();

OAuth认证,传入token就行了,代码参见新浪weibo4android examples

     当然以上代码不能直接写在LoiginActivity的onCreate方法中。

3、本次所要使用的控件:

     ImageView  Button EditText  TextView Toast

     要了解的类 Activity Intent Service Handler Thread

方法调用:(后续都是这个流程)


posted @ 2011-06-27 09:58  还是你最好  阅读(943)  评论(1编辑  收藏  举报