As an Android developer, it is inevitable to learn the ability to use and integrate third-party APIs
Sina Weibo as the most important news express media, the use is very common, and provides a more detailed API access method, so choose integrated SINAWEIBISDK.
Step1. Preparation steps:
First, register as a Sina developer, and under the Sina Development Platform policy and guidance, create and register your own applications that will be integrated, including SNIAWEIBOSDK downloads, app creation, access to App_key and app secret information, and other basic integration information.
Step2. Integrating SDK content into your own project
Note: The specific steps in the developer documentation given by Sina have detailed examples and explanations, which only record the problems they have encountered.
Permission scopes and import methods for both SDKs:
1.weibosdkcore.jar Package: For projects that require only authorization, sharing, and network request framework functionality
2.WeiboSDK Project (Library): Applicable Tumblr authorization, sharing, and need to login button, call Openapi project
How to import Weibosdkcore.jar packages:
Toggle Project display view to project options, copy and paste the Weibosdkcore.jar package file directly under the Libs folder->add as external Library->sync
The whole WEIBOSDK Project (library) as the Library method:
1. Toggle Project Display view to Android options
2. Copy the entire catalogue of the WEIBOSDK project to the same directory as your own project/import new module
3. Locate the Build.gradle folder for the WEIBOSDK project and find the Apply plugin: ' com.android.application ' setting option to change this option to apply plugin: ' Com.android.library ', then select Sync
4. Click on your project, right-->open module setting, select Dependencies-Plus, add SINASDK to Dependencies->sync
Note:
1. Two kinds of SDK simultaneous import project will cause exception, no solution, because the SDK engineering features more comprehensive, so try to delete the imported Weibosdkcore.jar package, Sync/rebuild project, can run simultaneously.
Specific network data interaction, JSON data parsing, interface design, user interaction and so on after the completion of all design, then one-time update.
Process records for third-party integrated Sina Weibo (SINAWEIBOSDK) in Android app development