Android app-FAQs about using WeChat Weibo sdk

Source: Internet
Author: User

Android app-FAQs about using Weibo sdk

Preface

Recently, many problems have been encountered during third-party login and sharing. On the one hand, it can be attributed to the lack of experience, and on the other hand, it also shows the ambiguity of the official documentation. This blog post will not write about how to use a third-party login to share information, because the official documentation has clearly written the steps. Here we will write something that is not explained in the official documentation, it is also a problem I found and solved during my own exploration.


I. Weibo login and sharing

The sdk documentation officially downloaded during the integration process of Weibo sdk has been clearly described. I will not mention it here, but I often encounter problems with the two sdks.

1. log on to the authorization page, that is, the application is not returned after logon. After the code is excluded, there are several other causes that cause this problem.

A. the application package name and signature are not used in the application management center, or the oauth2.0 authorization settings are not used in the advanced information.


<喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> VcD4KPHA + pgltzybzcm9 "http://www.2cto.com/uploadfile/Collfiles/20140726/20140726091254102.png" alt = "\">

If this field is incorrectly entered or is not used, the application cannot be returned after authorization.


B. If the package name and signature are correct and the oauth authorization page is filled in, the application cannot be returned.

At this time, you have to consider the appkey issue. The blogger first shared a key with ios. Later, I checked the official instructions to avoid using the same appkey on ios and android platforms as much as possible, therefore, an appkey is applied for again for android, and the application is successfully returned after the logon authorization is complete. Therefore, developers who encounter correct parameter configuration and code but still cannot return to the application are advised to apply for an appkey independently to solve this problem.

2. The second problem is also common. sso package or sign error

This is generally caused by the application signature problem. First, check whether the above signature and package name are correct, the value of the package attribute under the manifest node in the configuration file is the package name.

 
  
Here we will focus on the signature issue, because this issue is also often caused by this sso package or sign error.
  

The signature tool officially provided by Weibo is used. here we need to note that the signature is based on the app installed on your mobile phone, if your application development uses debug. keystore is installed on the mobile phone by default in eclipse, so this signature is not used in the official version. If you use this signature when publishing an application, the key is obviously incorrect, and the above sso package or sign error will be found. Therefore, if your application is to be launched, install the apk, export the apk to the mobile phone, and run it again using the official signature tool provided by Weibo to obtain the signature, if you fill in the signature to the basic information of the management center, this appkey is valid and will not be used.

Third-party login and sharing


A very common problem: if you do not log on when sharing, the login window is called up. If you log on correctly, clicking share does not respond.

After checking this problem, we found that many people have encountered this problem. Finally, after troubleshooting, it is confirmed that the application appkey information is incorrect.

In fact, this problem is also caused by the signature error. The difference between debug. keystore and released keystore leads to this problem.

When using the official signature tool to obtain the application signature, you must first install the application that publishes the keystore signature on your mobile phone. Then, the signature obtained is the correct signature, if the signature is correct, the appkey will not be used to share or log on.



Related Article

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.