All Projects → iwdael → LoginSharePay

iwdael / LoginSharePay

Licence: Apache-2.0 License
LoginSharePay集成QQ,微博,微信的登录和分享,包括微信支付。它配置简单,使用方便,且能够快速运用到应用中,为开发者节省了大量时间。

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to LoginSharePay

Diplomat
整合第三方 SDK 微信、微博、 QQ 等为统一的 Diplomat 接口。
Stars: ✭ 672 (+983.87%)
Mutual labels:  weibo, qq, wechat-sdk
Socialsdklibrary
提供微博、微信、QQ、Tim、QQ 轻聊版、钉钉的登陆分享功能支持;
Stars: ✭ 399 (+543.55%)
Mutual labels:  weibo, qq
SocialLibrary
微博分享、微信分享、qq分享,微信支付、支付宝支付 qq登录、微信登录、支付宝登录,直接引用官方提供api 安全省心
Stars: ✭ 61 (-1.61%)
Mutual labels:  weibo, qq
Web Oauth App
第三方登录服务 Web OAuth 示例
Stars: ✭ 30 (-51.61%)
Mutual labels:  weibo, qq
OAuthLogin.AspNetCore
第三方平台联合登陆(facebook、微信、微博、QQ、Kakao)
Stars: ✭ 43 (-30.65%)
Mutual labels:  weibo, qq
OAuthLogin
第三方平台联合登陆(facebook、微信、微博、QQ、Kakao)
Stars: ✭ 57 (-8.06%)
Mutual labels:  weibo, qq
Lcactionsheet
一款简约而不失强大的 ActionSheet,微博、微信和 QQ 都采用了极其类似的样式,完全支持 Swift。
Stars: ✭ 809 (+1204.84%)
Mutual labels:  weibo, qq
Gopay
QQ、微信(WeChat)、支付宝(AliPay)的Go版本SDK。【微信支付V3已支持,推荐使用微信V3接口】
Stars: ✭ 1,034 (+1567.74%)
Mutual labels:  qq, wechat-sdk
L Passport
Koa middleware and api sdk for wechat oauth, qq oauth, baidu oauth and weibo oauth
Stars: ✭ 52 (-16.13%)
Mutual labels:  weibo, qq
a-soul
Full-featured social media monitor that extracts data from a variety of services and pushes updates to Telegram or other platforms
Stars: ✭ 39 (-37.1%)
Mutual labels:  weibo, qq
Monkeyking
MonkeyKing helps you to post messages to Chinese Social Networks.
Stars: ✭ 2,699 (+4253.23%)
Mutual labels:  weibo, qq
YHThirdManager
一个快速、简单、易集成、扩展性好的社交化组件。摒弃友盟等三方库,使用原生SDK。支持微信支付、微信分享、微信登录、微信授权、QQ授权、QQ分享、QQ登录、新浪授权、新浪登录、新浪分享、微博评论、微博获取、支付宝支付。极大的减小了包体积;同时加入了自动管理提示框的功能
Stars: ✭ 41 (-33.87%)
Mutual labels:  weibo, qq
Socialite
Socialite is an OAuth2 Authentication tool. It is inspired by laravel/socialite, you can easily use it without Laravel.
Stars: ✭ 1,026 (+1554.84%)
Mutual labels:  weibo, qq
Sdk3rd
第三方SDK集成库,授权/分享/支付
Stars: ✭ 249 (+301.61%)
Mutual labels:  weibo, qq
union
union login for wechat,weibo,qq,alipay with go
Stars: ✭ 23 (-62.9%)
Mutual labels:  weibo, qq
humhub-oauth
Social OAuths built for the Social Platform HumHub
Stars: ✭ 16 (-74.19%)
Mutual labels:  qq
sharon
A lightweight and modular social sharing library
Stars: ✭ 16 (-74.19%)
Mutual labels:  weibo
MShell
一个Mirai机器人插件,用来连接QQ聊天窗口和系统Shell
Stars: ✭ 23 (-62.9%)
Mutual labels:  qq
QQSpider
爬取QQ用户信息(qq号、昵称、生日、地址等基本信息)并做简要analysis。
Stars: ✭ 21 (-66.13%)
Mutual labels:  qq
fuck-login
提供一些境内境外常见的站点Python登录脚本
Stars: ✭ 40 (-35.48%)
Mutual labels:  weibo

LoginSharePay



loginsharepay集成QQ,微博,微信的登录和分享以及微信支付。它配置简单,使用方便,且能够快速运用到应用中,为开发者节省了大量时间。

使用说明

QQ,微博,微信的登录和分享必须通过LoginSharePay类来实现,如果你只想实现登录功能,那么这两个方法就可以不用实现(onNewIntent(Intent intent),onActivityResult(int requestCode, int resultCode, Intent data))。

代码示例

public class MainActivity extends AppCompatActivity implements OnLoginshareListener {
    LoginSharePay loginShare;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        loginShare = new LoginSharePay(this);
	
        //loginShare.payWechat(...);
	//loginShare.launchQQLogin();
        //loginShare.launchWechatLogin();
        //loginShare.launchWeiboLogin();
	//loginShare.launchQQShare(MessageBody.QQMessageBodyBuilder());
        //loginShare.launchWechatShare(MessageBody.WechatMessageBodyBuilder());
        //loginShare.launchWeiboShare(MessageBody.WeiboMessageBodyBuilder());
    }

    @Override
    protected void onStart() {
        super.onStart();
        loginShare.register(this);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        loginShare.unRegister();
    }

    @Override
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        loginShare.onNewIntent(intent);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        loginShare.onActivityResult(requestCode, resultCode, data);
        super.onActivityResult(requestCode, resultCode, data);
    }
    
    /**
     * @param type 类型 QQ ,Wechat 或 Weibo
     * @param info json格式字符串的用户信息
     */
    @Override
    public void onLoginSuccess(Type type, String info) {
    }

    @Override
    public void onLoginCancel(Type type) {
    }

    @Override
    public void onLoginError(Type type, int errorCode) {
    }

    @Override
    public void onShareSuccess(Type type) {
    }

    @Override
    public void onShareCancel(Type type) {
    }

    @Override
    public void onShareError(Type type, int code) {
    }

快速引入项目

将本仓库引入你的项目:

Step 1. 添加仓库到Build文件

合并以下代码到项目根目录下的build.gradle文件的repositories中。

	allprojects {
		repositories {
			maven { url "https://dl.bintray.com/thelasterstar/maven/" }
		}
	}

Step 2. 添加依赖   

合并以下代码到需要使用的Module的dependencies中。

	dependencies {
                ...
	       compile 'com.hacknife:loginsharepay:1.1.5'
	       compile 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:+'
	       compile 'com.sina.weibo.sdk:core:4.1.0:openDefaultRelease@aar'
	}

Step 3. 设置JniLibs目录

合并以下代码到你的application module的build.gradle。点击查看详情

android {
    ...
    sourceSets {
        main() {
            jniLibs.srcDirs = ['libs']
        }
    }
}

Step 4. 复制动态库文件

点击这里下载 动态文件,解压并复制文件到libs目录。 Image text

Step 5. 复制Java文件

点击这里下载 Java文件,解压并复制文件到应用包。 Image text

Step 6. 修改AndroidManifest文件

复制代码且合并到Application标签

    <application 
        android:icon="@mipmap/app_logo"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/app_logo_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
	......
        <meta-data
            android:name="qq"
            android:value="qq_key" />
        <meta-data
            android:name="wechat"
            android:value="wechat_key" />
        <meta-data
            android:name="wechatSecret"
            android:value="wechat_secret" />
        <meta-data
            android:name="weibo"
            android:value="weibo_key" />
        <meta-data
            android:name="weiboRedirectUrl"
            android:value="weibo_redirectUrl" />
        <meta-data
            android:name="weiboScope"
            android:value="weibo_scope" />
        <activity
            android:name="com.tencent.tauth.AuthActivity"
            android:launchMode="singleTask"
            android:noHistory="true">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data android:scheme="tencent1234567" />
		<!-- tencent+qq_key -->
            </intent-filter>
        </activity>
        <activity
            android:name="com.tencent.connect.common.AssistActivity"
            android:configChanges="orientation|keyboardHidden"
            android:screenOrientation="behind"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />

        <!-- java file corresponds to it  -->
        <activity
            android:name=".wxapi.WXEntryActivity"
            android:exported="true"
            android:label="@string/app_name" />	    
	......

step 7. 修改签名

申请的第三方账户的签名必须与应用的签名一致。 否则,登录和分享会出现问题。


感谢浏览

如果你有任何疑问,请加入QQ群,我将竭诚为你解答。欢迎Star和Fork本仓库,当然也欢迎你关注我。
Image Text

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].