Previous Article: in the first step of Java Sina Weibo client development, this access_token will be used later.
Validity Period of access_token:
|
Authorization level |
Test |
Normal |
Intermediate |
Advanced |
Cooperation |
|
Authorization Validity Period |
1 day |
7 days |
15 days |
30 days |
90 days |
For more information about access_token and oau22. see:
Http://open.weibo.com/wiki/Oauth2#.E8.BF.87.E6.9C.9F.E6.97.B6.E9.97.B4
The package structure is as follows:
- Main class: Main Function entry. access_token is only used here. Get a user object through the account and users classes and make a parameter for maindialog.
- Maindialog: the interface of this Weibo client, which consists of two parts: user information, publish meager content, and refresh. The following is a jtabbedpane used to display the home page, @ me, comment, and so on.
- Personalinform: The jpanel used to place personal information.
- Friendtimeline: used to place the latest Weibo posts of the currently logged-on users and their users. Use the gridbaglayout layout to load daily microblogs through threads.
- Onestatus: this class is a key class. It is used to place the content of a microblog, including the Avatar, Weibo content, and images carried by Weibo.
Running result:
Download Code:Java Sina Weibo client development step 2
PS:Do not forget to set the access_token of main. For more information about how to obtain access_token, see Java Sina Weibo client development step 1.
For original works, please indicate the source for reprinting: All snails know