All Projects → iVanPan → Cordova_qq

iVanPan / Cordova_qq

Licence: mit
A Cordova wrapper around the Tencent QQ SDK for Android and iOS. Provides access to QQ ssoLogin, QQ Sharing, QQZone Sharing etc.

Projects that are alternatives of or similar to Cordova qq

Socialsdklibrary
提供微博、微信、QQ、Tim、QQ 轻聊版、钉钉的登陆分享功能支持;
Stars: ✭ 399 (+35.71%)
Mutual labels:  share, qq
Sharect
🔗 A lightweight JavaScript library to let users share their text selections to social networks.
Stars: ✭ 192 (-34.69%)
Mutual labels:  share, social-network
Goodshare.js
🚀 А useful modern JavaScript solution for share a link from your website to social networks or mobile messengers. Easy to install and configuring on any of your website!
Stars: ✭ 420 (+42.86%)
Mutual labels:  share, social-network
Easychatandroidclient
EasyChat是一个开源的社交类的App。主要包含消息、好友、群组等相关的IM核心功能。部分界面参照了QQ、微信等相关社交APP。EasyChat APP整体采用MVVM模式,基于JetPack(Lifecycle,LiveData,ViewModel,Room)构建
Stars: ✭ 64 (-78.23%)
Mutual labels:  qq, social-network
SocialSDK
iOS 实现sina(新浪)、wechat(微信)、qq(腾讯) 登录、分享功能,Share,ShareSDK,高仿友盟SocialSDK UI 实现,可自定义UI实现
Stars: ✭ 64 (-78.23%)
Mutual labels:  share, qq
React Native Qqsdk
A React Native wrapper around the Tencent QQ SDK for Android and iOS. Provides access to QQ ssoLogin, QQ Sharing, QQZone Sharing etc
Stars: ✭ 100 (-65.99%)
Mutual labels:  share, qq
Share Bar
A pure JS plugin to generate a share bar for social media, used by Globo.com.
Stars: ✭ 158 (-46.26%)
Mutual labels:  share, social-network
Sdk3rd
第三方SDK集成库,授权/分享/支付
Stars: ✭ 249 (-15.31%)
Mutual labels:  share, qq
tencent kit
flutter版QQ登录/分享
Stars: ✭ 201 (-31.63%)
Mutual labels:  share, qq
uc-qq-share-to-wechat
触发手机UC、QQ浏览器的原生的微信分享功能
Stars: ✭ 70 (-76.19%)
Mutual labels:  share, qq
jQuery-Awesome-Sosmed-Share-Button
Awesome Social Media Share Button With Share Count
Stars: ✭ 58 (-80.27%)
Mutual labels:  share, social-network
YHThirdManager
一个快速、简单、易集成、扩展性好的社交化组件。摒弃友盟等三方库,使用原生SDK。支持微信支付、微信分享、微信登录、微信授权、QQ授权、QQ分享、QQ登录、新浪授权、新浪登录、新浪分享、微博评论、微博获取、支付宝支付。极大的减小了包体积;同时加入了自动管理提示框的功能
Stars: ✭ 41 (-86.05%)
Mutual labels:  share, qq
linkcast
Share links, images, blogs and everything on the web with your friends in one click using this chrome extension Linkcast
Stars: ✭ 13 (-95.58%)
Mutual labels:  share, social-network
Cordova Plugin Geofence
Geofencing plugin for cordova
Stars: ✭ 261 (-11.22%)
Mutual labels:  cordova-plugin
Arbore
Friend-to-friend filesharing app to save the world from dystopia
Stars: ✭ 270 (-8.16%)
Mutual labels:  social-network
fanfou-cli
饭否命令行客户端
Stars: ✭ 21 (-92.86%)
Mutual labels:  social-network
aboutmeinfo-telegram-bot
ℹ️ About Me Info Bot: Share your social media and links on Telegram
Stars: ✭ 20 (-93.2%)
Mutual labels:  share
Vue Mini Social Network
A reactive mini-social-network created with Vue!! 🏳️‍🌈🤞
Stars: ✭ 278 (-5.44%)
Mutual labels:  social-network
Katana
🚀 a powerful, open-source screenshot utility for macOS
Stars: ✭ 270 (-8.16%)
Mutual labels:  share
qqmessageoutput
安卓QQ聊天记录导出
Stars: ✭ 100 (-65.99%)
Mutual labels:  qq

cordova-plugin-qqsdk

npm npm platform GitHub license

A Cordova wrapper around the Tencent QQ SDK for Android and iOS. Provides access to QQ ssoLogin, QQ Sharing, QQ Zone Sharing etc.. 简体中文.

Table of Contents

Feature

  1. QQ SSO Login
  2. QQ Logout
  3. QQ Share (Text、Image、News、Audio)
  4. QQZone Share(Text、Image、News、Audio)
  5. QQ Favorites(Text、Image、News、Audio)
  6. checkClientInstalled

Requirements

  • Cordova Version 3.5+
  • Cordova-Android >= 7.0
  • Cordova-iOS >= 4.0

Installation

1.cordova plugin add cordova-plugin-qqsdk --variable QQ_APP_ID=YOUR_QQ_APPID
2. cordova build

Documentation

Support API

  1. ssoLogin
  2. Logout
  3. checkClientInstalled
  4. Share(see form below)
Platform iOS iOS   iOS   Android Android Android
ShareScene   QQ     QQZone QQ Favorite  QQ     QQZone QQ Favorite
Text        √       √     √          ✕         √     √      
Image        √     √   √        √     √   √    
    News          √       √         √          √         √         √      
    Audio          √       √         √          √         √         √      

Error Code

When you use qq login,you may get an error code.If you get one, find detail error msg from here please.

Image

This plugin support three Image types:

  1. Network URL
  2. Base64
  3. Absolute file path

Usage

checkClientInstalled
var args = {};
args.client = QQSDK.ClientType.QQ;//QQSDK.ClientType.QQ,QQSDK.ClientType.TIM;
QQSDK.checkClientInstalled(function () {
  alert('client is installed');
}, function () {
  // if installed QQ Client version is not supported sso,also will get this error
  alert('client is not installed');
}, args);
ssoLogin
var args = {};
args.client = QQSDK.ClientType.QQ;//QQSDK.ClientType.QQ,QQSDK.ClientType.TIM;
QQSDK.ssoLogin(function (result) {
  alert('token is ' + result.access_token);
  alert('userid is ' + result.userid);
  alert('expires_time is ' + new Date(parseInt(result.expires_time)) + ' TimeStamp is ' + result.expires_time);
}, function (failReason) {
  alert(failReason);
}, args);

logout
QQSDK.logout(function () {
  alert('logout success');
}, function (failReason) {
  alert(failReason);
});
shareText
var args = {};
args.client = QQSDK.ClientType.QQ;//QQSDK.ClientType.QQ,QQSDK.ClientType.TIM;
args.scene = QQSDK.Scene.QQ;//QQSDK.Scene.QQZone,QQSDK.Scene.Favorite
args.text = '这个是 Cordova QQ 分享文字';
QQSDK.shareText(function () {
  alert('shareText success');
}, function (failReason) {
  alert(failReason);
}, args);
shareImage
var args = {};
args.client = QQSDK.ClientType.QQ;//QQSDK.ClientType.QQ,QQSDK.ClientType.TIM;
args.scene = QQSDK.Scene.QQ;//QQSDK.Scene.QQZone,QQSDK.Scene.Favorite
args.title = '这个是 Cordova QQ 图片分享的标题';
args.description = '这个是 Cordova QQ 图片分享的描述';
args.image = 'https://cordova.apache.org/static/img/cordova_bot.png';
QQSDK.shareImage(function () {
  alert('shareImage success');
}, function (failReason) {
  alert(failReason);
}, args);
shareNews
var args = {};
args.client = QQSDK.ClientType.QQ;//QQSDK.ClientType.QQ,QQSDK.ClientType.TIM;
args.scene = QQSDK.Scene.QQ;//QQSDK.Scene.QQZone,QQSDK.Scene.Favorite
args.url = 'https://cordova.apache.org/';
args.title = '这个是 Cordova QQ 新闻分享的标题';
args.description = '这个是 Cordova QQ 新闻分享的描述';
args.image = 'https://cordova.apache.org/static/img/cordova_bot.png';
QQSDK.shareNews(function () {
  alert('shareNews success');
}, function (failReason) {
  alert(failReason);
}, args);
shareAudio
var args = {};
args.client = QQSDK.ClientType.QQ;//QQSDK.ClientType.QQ,QQSDK.ClientType.TIM;
args.scene = QQSDK.Scene.QQ;//QQSDK.Scene.QQZone,QQSDK.Scene.Favorite
args.url = 'https://y.qq.com/portal/song/001OyHbk2MSIi4.html';
args.title = '十年';
args.description = '陈奕迅';
args.image = 'https://y.gtimg.cn/music/photo_new/T001R300x300M000003Nz2So3XXYek.jpg';
args.flashUrl = 'http://stream20.qqmusic.qq.com/30577158.mp3';
QQSDK.shareAudio(function () {
  alert('shareAudio success');
}, function (failReason) {
  alert(failReason);
}, args);
getUserInfo
var url = 'https://graph.qq.com/user/get_user_info?access_token=' + accessToken + '&oauth_consumer_key=' + QQ_APP_ID + '&openid=' + userId;
http.get(url)

About SDK

This plugin use 3.2.1 version sdk for Android,3.2.3 version sdk for iOS. You can download lastest version sdk here

Notes

  1. This plugin is required Cordova-Android version >=4.0,so using Cordova 5.0 or higher is recommended
  2. This plugin should be used after the deviceready event has been fired!!!
  3. If Cordova version  <5.1.1,when two Cordova plugins are modifying “*-Info.plist” CFBundleURLTypes, only the first added plugin is getting the changes applied.so after installing plugin,please check the URLTypes in your Xcode project.You can find this issue here Update:This Bug is fixed in last Cordova version(5.1.1)
  4. For Android: make sure your signature is correct !!!
  5. long share URL and large image shoud be avoid.

Demo

  1. install this plugin
  2. backup www folder in your cordova project
  3. replace www by example_www
  4. install cordova-plugin-camera
  5. cordova build & test
example

Contributing

Feel free to contribute

License

cordova-plugin-qqsdk is released under the MIT license. See LICENSE file for more information.

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