Java Sina Weibo client development step 2

Source: Internet
Author: User

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:

  1. 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.
  2. 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.
  3. Personalinform: The jpanel used to place personal information.
  4. 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.
  5. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.