Giter VIP home page Giter VIP logo

icok's Introduction

iCok.

无需官方SDK,实现微信、QQ社交功能,支持Web登录

Configuration.

如果需要使用canOpenURL:判断是否安装客户端,则务必添加以下白名单

  • wechat
  • weixin
  • mqqOpensdkSSoLogin
  • mqqopensdkapiV2
  • mqqwpa
  • mqqopensdkapiV3
  • wtloginmqq2
  • mqq
  • mqqapi

添加URL Schemes

  • tencent111111111
  • wxa6711111111

Usage.

微信登录
[iCok loginWithWXAppId:@"wxa6711111111" appSecret:@"bb870c004ac64486379341949e17d5b4" completeHandler:^(NSDictionary *response) {
  NSLog(@"微信登录成功:%@",response);
} failure:^(NSError *error) {
  NSLog(@"微信登录失败:%@",error.description);
}];
微信分享
[iCok shareWithWXAppId:@"wxa6711111111" scene:ICOK_SESSION_TYPE title:@"title" description:@"description" link:@"https://www.github.com" image:[UIImage imageNamed:@"profile"] completeHandler:^(NSDictionary *response) {
  NSLog(@"微信分享成功");
} failure:^(NSError *error) {
  NSLog(@"微信分享失败:%@",error.description);
}];
QQ登录
[iCok loginWithQQAppId:@"111111111" completeHandler:^(NSDictionary *response) {
  NSLog(@"QQ登录成功:%@",response);
} failure:^(NSError *error){
  NSLog(@"QQ登录失败:%@",error.description);
}];
QQ分享
[iCok shareWithQQAppId:@"111111111" scene:ICOK_SESSION_TYPE title:@"title" description:@"description" link:@"https://www.github.com" image:[UIImage imageNamed:@"profile"] completeHandler:^(NSDictionary *response) {
  NSLog(@"QQ分享成功");
} failure:^(NSError *error) {
  NSLog(@"QQ分享失败:%@",error.description);
}];

icok's People

Contributors

bugfreex avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.