Android app-FAQs about using WeChat Weibo third-party sdks during logon and sharing, Android sdk

Source: Internet
Author: User

Android app-FAQs about third-party Weibo sdk logon and sharing, androidsdk

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.


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.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"    package="com.yang.abc"
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.



3. There is another problem. I do not know why so far, but I still need to explore it.

When using sso to log on, when the Weibo client has been installed on the mobile phone, the sso login will be normally called

When the Weibo client is not installed on the mobile phone, it is common sense to call webpage logon, but there is a null pointer exception, and debug will find that the object is not empty at all, this problem has always plagued me. I will try to find a solution and add this one.

2. 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.




I recently made an Android Application and added a third-party account to log on (Sina Weibo login). I don't know how to do this. For more information, see.

You must first apply for a third-party application license on sina. Obtain a key. Then sina has its own sdk. You only need to call sina's own sdk. Detailed descriptions are provided on the sina Development Platform website.

How can a third-party app jump to a third-party app on the Android platform to share a webpage sent from a third party?

It seems that android intelligence is like this. If it doesn't, it means that the program running has no permission to call. This is a problem with the software.
 

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.