The problem record of openapi practice in Weibo

Source: Internet
Author: User

Today want to through Sina Weibo Openapi, do a client come out. It can be said that the process is more difficult. This is only a matter of recording the problems encountered, the other according to the API requirements to register, create the application of what is good.

1. API jar Reference problem

Created your own project and referenced the WEIBOSDK project according to the documentation, and found that there were always errors in the code where the API was referenced. This is due to the WEIBOSDK project in the bin directory will generate a Weibocore.jar, when our project to introduce the SDK project will be added to this jar, and will reference the SDK project under the Libs Weibosdkcode.jar, this time due to the introduction of the jar package in order to cause error. By right-clicking on the project in the---build path--configure build path, as shown, adjust the order of Android Dependencies and Android Private libraries as shown in the

2, using the login button click after the error redirect_uri_mismatch

Think of should be redirect_url = "http://www.sina.com"; problems, or network problems, modified to https://api.weibo.com/oauth2/default.html, using 3g, no

After looking for information should be this address can not be authenticated, so in the development platform, my application-application information-the advanced information can be seen

OAuth2.0 Authorization Setting Authorization
Callback page, where the address of the authorization callback page is set to be the same as Redirect_url, save it.
3. Login times SSO package or sign error error
When the above steps are correct, the SSO package or sign error appears again because the packages
are unsigned
In my application-application information-Basic information application basic information click Edit after the Android signature package information, enter our app package name, and download (HTTPS://GITHUB.COM/MOBILERESEARCH/WEIBO_ANDROID_SDK /blob/master/app_signatures.apk) Signing Tool, enter the package name to sign the MD5 signature string into the signature of the application information, save the retry, found that the token can be successfully returned and displayed.

The problem record of openapi practice in Weibo

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.