### Initialize ShareLoginLib with Third-Party Keys Source: https://github.com/lingochamp/shareloginlib/blob/master/README.md Initializes the ShareBlock instance with the application IDs and secrets required for WeChat, Weibo, and QQ. This crucial step must be performed before utilizing any sharing or login functionalities provided by the library. ```java ShareBlock.getInstance().initShare(wechatAppid, weiboId, qqId, wechatSecret); ``` -------------------------------- ### Implement WeChat Login with Callback Source: https://github.com/lingochamp/shareloginlib/blob/master/README.md Demonstrates initiating a WeChat login operation and handling its outcomes. The PlatformActionListener provides methods to process successful login (receiving user info), errors, or cancellations, allowing for custom application logic. ```java ILoginManager iLoginManager = new WechatLoginManager (MainActivity.this); iLoginManager.login(new PlatformActionListener() { @Override public void onComplete(HashMap userInfo) { //TODO } @Override public void onError() { //TODO } @Override public void onCancel() { //TODO } }); ``` -------------------------------- ### Add ShareLoginLib Dependency to Gradle Source: https://github.com/lingochamp/shareloginlib/blob/master/README.md This snippet demonstrates how to include the ShareLoginLib dependency in an Android project's build.gradle file. The 'compile' directive specifies the library's group, artifact, and version for integration. ```groovy compile 'com.echodjb.shareloginlib:share:0.6' ``` -------------------------------- ### Share Webpage Content to WeChat Source: https://github.com/lingochamp/shareloginlib/blob/master/README.md Illustrates how to share a webpage with a title, content, data URL, and image URL to WeChat. It uses WechatShareManager to facilitate the sharing process to a specified WeChat share type, such as a chat or moments. ```java IShareManager iShareManager = new WechatShareManager(context); iShareManager.share(new ShareContentWebpage("title", "content", "dataUrl", "imageUrl",WechatShareManager.WEIXIN_SHARE_TYPE_TALK); ``` -------------------------------- ### Set Weibo Redirect URL for Authentication Source: https://github.com/lingochamp/shareloginlib/blob/master/README.md Configures the redirect URL specifically for Weibo authentication callbacks. This URL is essential for Weibo to correctly return control to the application after a user grants permissions during the login process. ```java ShareBlock.getInstance().initWeiboRedriectUrl(weiboRedriectUrl); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.