All Projects → lingochamp → Diplomat

lingochamp / Diplomat

Licence: mit
整合第三方 SDK 微信、微博、 QQ 等为统一的 Diplomat 接口。

Projects that are alternatives of or similar to Diplomat

Socialite
Socialite is an OAuth2 Authentication tool. It is inspired by laravel/socialite, you can easily use it without Laravel.
Stars: ✭ 1,026 (+52.68%)
Mutual labels:  qq, social-login, wechat, weibo
LoginSharePay
LoginSharePay集成QQ,微博,微信的登录和分享,包括微信支付。它配置简单,使用方便,且能够快速运用到应用中,为开发者节省了大量时间。
Stars: ✭ 62 (-90.77%)
Mutual labels:  weibo, qq, wechat-sdk
Gopay
QQ、微信(WeChat)、支付宝(AliPay)的Go版本SDK。【微信支付V3已支持,推荐使用微信V3接口】
Stars: ✭ 1,034 (+53.87%)
Mutual labels:  wechat-sdk, qq, wechat
Laravel Socialite
Social OAuth Authentication for Laravel 5. drivers: facebook, github, google, linkedin, weibo, qq, wechat and douban
Stars: ✭ 296 (-55.95%)
Mutual labels:  social-login, wechat, weibo
Monkeyking
MonkeyKing helps you to post messages to Chinese Social Networks.
Stars: ✭ 2,699 (+301.64%)
Mutual labels:  qq, wechat, weibo
L Passport
Koa middleware and api sdk for wechat oauth, qq oauth, baidu oauth and weibo oauth
Stars: ✭ 52 (-92.26%)
Mutual labels:  qq, wechat, weibo
Lcactionsheet
一款简约而不失强大的 ActionSheet,微博、微信和 QQ 都采用了极其类似的样式,完全支持 Swift。
Stars: ✭ 809 (+20.39%)
Mutual labels:  qq, wechat, weibo
Sdk3rd
第三方SDK集成库,授权/分享/支付
Stars: ✭ 249 (-62.95%)
Mutual labels:  qq, wechat, weibo
Socialsdklibrary
提供微博、微信、QQ、Tim、QQ 轻聊版、钉钉的登陆分享功能支持;
Stars: ✭ 399 (-40.62%)
Mutual labels:  qq, wechat, weibo
Wechatpy
WeChat SDK for Python
Stars: ✭ 3,016 (+348.81%)
Mutual labels:  wechat-sdk, wechat
React Native Wechat
🚀 WeChat login, share, favorite and payment for React-Native on iOS and Android platforms (QQ: 336021910)
Stars: ✭ 2,842 (+322.92%)
Mutual labels:  wechat-sdk, wechat
Stepchanger
步数修改器
Stars: ✭ 275 (-59.08%)
Mutual labels:  qq, wechat
SocialLibrary
微博分享、微信分享、qq分享,微信支付、支付宝支付 qq登录、微信登录、支付宝登录,直接引用官方提供api 安全省心
Stars: ✭ 61 (-90.92%)
Mutual labels:  weibo, qq
Ocbarrage
iOS 弹幕库 OCBarrage, 同时渲染5000条弹幕也不卡, 轻量, 可拓展, 高度自定义动画, 超高性能, 简单易上手; A barrage render-engine with high performance for iOS. At the same time, rendering 5000 barrages is also very smooth, lightweight, scalable, highly custom animation, ultra high performance, simple and easy to use!
Stars: ✭ 589 (-12.35%)
Mutual labels:  qq, wechat
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 (-94.2%)
Mutual labels:  weibo, qq
Ocbarrage
iOS 弹幕库 OCBarrage, 同时渲染5000条弹幕也不卡, 轻量, 可拓展, 高度自定义动画, 超高性能, 简单易上手; A barrage render-engine with high performance for iOS. At the same time, rendering 5000 barrages is also very smooth, lightweight, scalable, highly custom animation, ultra high performance, simple and easy to use!
Stars: ✭ 294 (-56.25%)
Mutual labels:  qq, wechat
OAuthLogin.AspNetCore
第三方平台联合登陆(facebook、微信、微博、QQ、Kakao)
Stars: ✭ 43 (-93.6%)
Mutual labels:  weibo, qq
Rsshub
🍰 Everything is RSSible
Stars: ✭ 18,111 (+2595.09%)
Mutual labels:  wechat, weibo
Wechatcmd
提供微信终端版本、微信命令行版本聊天功能、微信机器人
Stars: ✭ 628 (-6.55%)
Mutual labels:  wechat-sdk, wechat
Werobot
WeRoBot 是一个微信公众号开发框架
Stars: ✭ 3,973 (+491.22%)
Mutual labels:  wechat-sdk, wechat

Diplomat

统一第三方 SDKs 的登录和分享接口。目前支持微信QQ微博
P.S: 其中除微博支持 OAuth ,其它第三方只支持 SSO ,需安装相应的客户端才能使用。

使用

  1. 通过 CocoaPods 安装。
    pod 'Diplomat'
    选择性安装
    pod 'Diplomat/Wechat'
    pod 'Diplomat/QQ'

  2. 导入需要使用的第三方 SDK。
    #import <Diplomat/WechatProxy.h>
    #import <Diplomat/QQProxy.h>

  3. 使用

// 在 application:didFinishLaunchingWithOptions: 添加  
[[Diplomat sharedInstance] registerWithConfigurations:@{kDiplomatTypeWechat: @{kDiplomatAppIdKey: @"wxd930ea5d5a258f4f",
                                                                               kDiplomatAppSecretKey: @"db426a9829e4b49a0dcac7b4162da6b6"},
                                                        kDiplomatTypeQQ: @{kDiplomatAppIdKey: @"222222"}}];

// 授权登录。
[[Diplomat sharedInstance] authWithName:thirdPartyName
                              completed:^(id result, NSError *error) {
                                 // ...
                            }];
  
// 分享。
 // Create DTMessage message ...
[[Diplomat sharedInstance] share:message
                            name:thirdPartyName
                       completed:^(id result, NSError *error) {
                        // ...
                       }];

DTMessage 中 userInfo 的使用。

userInfo 是用来携带额外的信息。
微信分享场景的选择:

DTMessage *message = DTMessage()
// ...
message.userInfo = @{kWechatSceneTypeKey: @(WXSceneTimeline)}
// WXSceneTimeline: 朋友圈(默认)、WXSceneSession: 好友、WXSceneFavorite: 收藏。

通过 Safari 分享到 QZone (感谢 @hi-guy 贡献):

DTMessage *message = DTMessage()
// ...
message.userInfo = @{kTencentQQSceneTypeKey: @(TencentSceneZone)}
// TencentSceneQQ: 通过 QQ 客户端分享(默认,包含了分享到 QZone 选项), 
// TencentSceneZone: 通过 Safari 只分享到 QZone (有 QQ 客户端时不推荐使用)。

扩展第三方 SDK (详见实现逻辑)

  1. 实现协议 DiplomatProxyProtocol
  2. 添加将 DTMessage 转换到第三方 SDK 的方法。
  3. 将实现的自定义扩展注册到 Diplomat 中。
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].