QQ 互联 SDK
const qq = ymx.requirePlugin('ymx-qq') as YmxQq;// 登录const result = await qq.login({ scope: 'all' });console.log('authCode:', result.authCode);// 分享到 QQ 空间(shareJson 与签名由业务后台生成)const r = await qq.share({ type: 3009, timestamp, nonce, shareJson, shareJsonSign}); 复制
const qq = ymx.requirePlugin('ymx-qq') as YmxQq;// 登录const result = await qq.login({ scope: 'all' });console.log('authCode:', result.authCode);// 分享到 QQ 空间(shareJson 与签名由业务后台生成)const r = await qq.share({ type: 3009, timestamp, nonce, shareJson, shareJsonSign});
只读
获取插件 ID
获取插件版本,如 1.2.3
1.2.3
检查QQ是否已安装
安装状态
授权登录
可选
登录参数
登录结果,包含authCode
移除监听器
设置监听器,接收 eventName 事件名称,data 事件数据
注意: 此接口为覆盖操作,仅保留最后一个监听器,最后的 listener 才能收到事件通知。
分享到 QQ
share_uris
分享数据
分享结果
const res = await qq.share({ type: 3009, timestamp, nonce, shareJson, shareJsonSign}); 复制
const res = await qq.share({ type: 3009, timestamp, nonce, shareJson, shareJsonSign});
QQ 互联 SDK
示例