All Projects → nixzhu → Monkeyking

nixzhu / Monkeyking

Licence: mit
MonkeyKing helps you to post messages to Chinese Social Networks.

Programming Languages

swift
15916 projects
PHP
23972 projects - #3 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to Monkeyking

Socialite
Socialite is an OAuth2 Authentication tool. It is inspired by laravel/socialite, you can easily use it without Laravel.
Stars: ✭ 1,026 (-61.99%)
Mutual labels:  alipay, qq, wechat, weibo
Sdk3rd
第三方SDK集成库,授权/分享/支付
Stars: ✭ 249 (-90.77%)
Mutual labels:  alipay, qq, wechat, weibo
YHThirdManager
一个快速、简单、易集成、扩展性好的社交化组件。摒弃友盟等三方库,使用原生SDK。支持微信支付、微信分享、微信登录、微信授权、QQ授权、QQ分享、QQ登录、新浪授权、新浪登录、新浪分享、微博评论、微博获取、支付宝支付。极大的减小了包体积;同时加入了自动管理提示框的功能
Stars: ✭ 41 (-98.48%)
Mutual labels:  alipay, weibo, qq
SocialLibrary
微博分享、微信分享、qq分享,微信支付、支付宝支付 qq登录、微信登录、支付宝登录,直接引用官方提供api 安全省心
Stars: ✭ 61 (-97.74%)
Mutual labels:  alipay, weibo, qq
Stepchanger
步数修改器
Stars: ✭ 275 (-89.81%)
Mutual labels:  alipay, qq, wechat
Socialsdklibrary
提供微博、微信、QQ、Tim、QQ 轻聊版、钉钉的登陆分享功能支持;
Stars: ✭ 399 (-85.22%)
Mutual labels:  qq, wechat, weibo
Sns auth
通用第三方登录SDK,支持微信,微信扫码,QQ,微博登录,支付宝登录,Facebook,Line,Twitter,Google
Stars: ✭ 520 (-80.73%)
Mutual labels:  alipay, qq, wechat
Lcactionsheet
一款简约而不失强大的 ActionSheet,微博、微信和 QQ 都采用了极其类似的样式,完全支持 Swift。
Stars: ✭ 809 (-70.03%)
Mutual labels:  qq, wechat, weibo
Diplomat
整合第三方 SDK 微信、微博、 QQ 等为统一的 Diplomat 接口。
Stars: ✭ 672 (-75.1%)
Mutual labels:  qq, wechat, weibo
Gopay
QQ、微信(WeChat)、支付宝(AliPay)的Go版本SDK。【微信支付V3已支持,推荐使用微信V3接口】
Stars: ✭ 1,034 (-61.69%)
Mutual labels:  alipay, qq, wechat
L Passport
Koa middleware and api sdk for wechat oauth, qq oauth, baidu oauth and weibo oauth
Stars: ✭ 52 (-98.07%)
Mutual labels:  qq, wechat, weibo
Revokemsgpatcher
A hex editor for WeChat/QQ/TIM - PC版微信/QQ/TIM防撤回补丁(我已经看到了,撤回也没用了)
Stars: ✭ 12,482 (+362.47%)
Mutual labels:  qq, wechat
Lxspider
爬虫案例合集。包括但不限于《淘宝、京东、天猫、豆瓣、抖音、快手、微博、微信、阿里、头条、pdd、优酷、爱奇艺、携程、12306、58、搜狐、百度指数、维普万方、Zlibraty、Oalib、小说、招标网、采购网、小红书》
Stars: ✭ 60 (-97.78%)
Mutual labels:  wechat, weibo
Fitness
Flutter 仿微博客户端!A Weibo client application developed with Flutter, which supports both Android and iOS.
Stars: ✭ 75 (-97.22%)
Mutual labels:  wechat, weibo
Anti Recall
Android 免root 防撤回神器 !
Stars: ✭ 1,274 (-52.8%)
Mutual labels:  qq, wechat
Easychatandroidclient
EasyChat是一个开源的社交类的App。主要包含消息、好友、群组等相关的IM核心功能。部分界面参照了QQ、微信等相关社交APP。EasyChat APP整体采用MVVM模式,基于JetPack(Lifecycle,LiveData,ViewModel,Room)构建
Stars: ✭ 64 (-97.63%)
Mutual labels:  qq, wechat
Qq Wechat Emotion Parser
QQ、微信表情符号解析:字符串到图片URL
Stars: ✭ 82 (-96.96%)
Mutual labels:  qq, wechat
Teepay
Typecho 个人支付宝、微信收款插件
Stars: ✭ 90 (-96.67%)
Mutual labels:  alipay, wechat
Wechaty
Conversational RPA SDK for Chatbot Makers
Stars: ✭ 11,647 (+331.53%)
Mutual labels:  wechat, qq
Rageframe2
一个基于Yii2高级框架的快速开发应用引擎
Stars: ✭ 1,553 (-42.46%)
Mutual labels:  alipay, wechat

MonkeyKing

MonkeyKing helps you post SNS messages to Chinese Social Networks, without their buggy SDKs.

MonkeyKing uses the same analysis process of openshare. We also use some reverse engineering tools such as Hopper Disassembler to unveil several undocumented authentication mechanisms under the hood. It supports sharing Text, URL, Image, Audio, Video, and File to WeChat, QQ, Alipay or Weibo. MonkeyKing can also post messages to Weibo by a web page. (Note: Audio and Video are exclusive to WeChat or QQ, and File is exclusive to QQ Dataline)

MonkeyKing also supports OAuth and Mobile payment via WeChat and Alipay!

Requirements

Swift 5, iOS 9

(For Swift 4.2, use version 1.13.0)

(For Swift 4.1/4.0, use version 1.11.0)

(For Swift 3, use version 1.3.0)

Examples

Share

Example: Share to WeChat (微信):

  1. In your Project Target's Info.plist, set URL Type, LSApplicationQueriesSchemes as follow:

    You should also add weixinULAPI once you enabled Universal Link of your WeChat App.

  2. Register account: // it's not necessary to do it here, but for the sake of convenience

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        MonkeyKing.regsiterAccount(
            .weChat(
                appID: "xxx",
                appKey: "yyy",
                miniAppID: nil,
                universalLink: nil // FIXME: You have to adopt Universal Link otherwise your app name becomes "Unauthorized App"(未验证应用)...
            )
        )
        return true
    }
  3. Append the following code to handle callbacks:

    // AppDelegate.swift
    
    func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
    //func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool { // only for iOS 8
        return MonkeyKing.handleOpenURL(url)
    }

    Remember to handle userActivities if you are using UIScene in your project:

    // SceneDelegate.swift
    
    func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
        MonkeyKing.handleOpenUserActivity(userActivity)
    }
  4. Prepare your message and ask MonkeyKing to deliver it:

    @IBAction func shareURLToWeChatSession(sender: UIButton) {
    
        MonkeyKing.registerAccount(.weChat(appID: "xxx", appKey: "yyy", miniAppID: nil)) // you can do it here (just before deliver)
    
        let message = MonkeyKing.Message.weChat(.session(info: (
            title: "Session",
            description: "Hello Session",
            thumbnail: UIImage(named: "rabbit"),
            media: .url(URL(string: "http://www.apple.com/cn")!)
        )))
    
        MonkeyKing.deliver(message) { success in
            print("shareURLToWeChatSession success: \(success)")
        }
    }

It's done!

OAuth

Example: Weibo OAuth

MonkeyKing.oauth(for: .weibo) { (oauthInfo, response, error) -> Void in
    print("OAuthInfo \(oauthInfo) error \(error)")
    // Now, you can use the token to fetch info.
}

or, WeChat OAuth for code only

MonkeyKing.weChatOAuthForCode { [weak self] (code, error) in
    guard let code = code else {
        return
    }
    // TODO: fetch info with code
}

If the user doesn't have Weibo App installed on their devices then MonkeyKing will use web OAuth:

Pay

Example: Alipay

let order = MonkeyKing.Order.alipay(urlString: urlString, scheme: nil)
MonkeyKing.deliver(order) { result in
    print("result: \(result)")
}

You need to configure pay.php in a remote server. You can find an example of pay.php at the Demo project.


Launch WeChat Mini App

let path = "..."
MonkeyKing.launch(.weChat(.miniApp(username: "gh_XXX", path: path, type: .release))) { result in
    switch result {
    case .success:
        break
    case .failure(let error):
        print("error:", error)
    }
}

Note that username has a gh_ prefix (原始ID).

More

If you like to use UIActivityViewController for sharing then MonkeyKing has AnyActivity which can help you.

Check the demo for more information.

Installation

Carthage

github "nixzhu/MonkeyKing"

CocoaPods

pod 'MonkeyKing'

Swift Package Manager

https://github.com/nixzhu/MonkeyKing

Contributors

Thanks to all the contributors.

Credits

WeChat logos from WeChat-Logo by Ray.

License

MonkeyKing is available under the MIT License. See the LICENSE file for more info.

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