{"id":26223299,"url":"https://github.com/rxreader/tencent_kit","last_synced_at":"2026-01-11T13:32:40.493Z","repository":{"id":40658725,"uuid":"162974753","full_name":"RxReader/tencent_kit","owner":"RxReader","description":"Flutter版QQ登录/分享","archived":false,"fork":false,"pushed_at":"2025-06-16T13:23:47.000Z","size":19630,"stargazers_count":259,"open_issues_count":49,"forks_count":79,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-16T14:03:46.447Z","etag":null,"topics":["flutter","login","qq","share"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/tencent_kit","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RxReader.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-24T09:37:44.000Z","updated_at":"2025-06-16T13:23:49.000Z","dependencies_parsed_at":"2024-06-21T05:47:55.846Z","dependency_job_id":"e916d15e-b72b-4227-8248-a03229a74e48","html_url":"https://github.com/RxReader/tencent_kit","commit_stats":{"total_commits":218,"total_committers":6,"mean_commits":"36.333333333333336","dds":0.02752293577981646,"last_synced_commit":"b493831bca34fbeac0069bcbd25e0b5505201663"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/RxReader/tencent_kit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RxReader%2Ftencent_kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RxReader%2Ftencent_kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RxReader%2Ftencent_kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RxReader%2Ftencent_kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RxReader","download_url":"https://codeload.github.com/RxReader/tencent_kit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RxReader%2Ftencent_kit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278547821,"owners_count":26004775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flutter","login","qq","share"],"created_at":"2025-03-12T17:30:44.726Z","updated_at":"2025-10-06T02:10:30.620Z","avatar_url":"https://github.com/RxReader.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tencent_kit\n\n[![Pub Package](https://img.shields.io/pub/v/tencent_kit.svg)](https://pub.dev/packages/tencent_kit)\n[![License](https://img.shields.io/github/license/RxReader/tencent_kit)](https://github.com/RxReader/tencent_kit/blob/master/LICENSE)\n\nFlutter 版腾讯(QQ)SDK\n\n## 相关工具\n\n* [Flutter版微信SDK](https://github.com/RxReader/wechat_kit)\n* [Flutter版腾讯(QQ)SDK](https://github.com/RxReader/tencent_kit)\n* [Flutter版新浪微博SDK](https://github.com/RxReader/weibo_kit)\n* [Flutter版支付宝SDK](https://github.com/RxReader/alipay_kit)\n* [Flutter版深度链接](https://github.com/RxReader/link_kit)\n* [Flutter版walle渠道打包工具](https://github.com/RxReader/walle_kit)\n\n## Dart/Flutter Pub 私服\n\n* [simple_pub_server](https://github.com/RxReader/simple_pub_server)\n\n## 相关文档\n\n* [腾讯开放平台](https://open.tencent.com/)\n* [QQ互联](http://wiki.connect.qq.com/)\n* [QQ 创建、填写及校验UniversalLinks](https://wiki.connect.qq.com/%E5%A1%AB%E5%86%99%E5%8F%8A%E6%A0%A1%E9%AA%8Cuniversallinks)\n* [Apple Universal Links](https://developer.apple.com/library/archive/documentation/General/Conceptual/AppSearch/UniversalLinks.html)\n\n## 开始使用\n\n### Android\n\n```txt\n# 不需要做任何额外接入工作\n# 配置已集成到脚本里\n# 混淆已打入 Library，随 Library 引用，自动添加到 apk 打包混淆\n```\n\n### iOS\n\n\u003e 暂不支持 SceneDelegate，详见文档 [iOS_SDK环境搭建](https://wiki.connect.qq.com/ios_sdk%e7%8e%af%e5%a2%83%e6%90%ad%e5%bb%ba)\n\n```txt\n# 不需要做任何额外接入工作\n# 配置已集成到脚本里\n```\n\n* Universal Links\n\napple-app-site-association - 通过 https://${your applinks domain}/.well-known/apple-app-site-association 链接可访问\n\n示例:\n\nhttps://${your applinks domain}/universal_link/${example_app}/qq_conn/${appId}\n\n```json\n{\n  \"applinks\": {\n    \"apps\": [],\n    \"details\": [\n      {\n        \"appID\": \"${your team id}.${your app bundle id}\",\n        \"paths\": [\n          \"/universal_link/${example_app}/qq_conn/${your tencent app id}/*\"\n        ]\n      }\n    ]\n  }\n}\n```\n\n\u003e ⚠️ 很多 SDK 都会用到 universal_link，可为不同 SDK 分配不同的 path 以作区分\n\n### HarmonyOS\n\n* 当前在 `HarmonyOS` 平台, 仅支持 `setIsPermissionGranted/registerApp/isQQInstalled/loginServerSide`\n* 由于 SDK 限制，当前仅支持 Server-Side 模式登录，请调用 `loginServerSide` 方法登录, 支持拉起 App 授权或 H5 授权 (qrcode 为 true 即可)\n* 为了 API 统一, Server-Side 模式授权返回的 auth code 存储在 `TencentLoginResp.accessToken` (不要当成客户端的 token 使用)\n* 详情阅读官方文档: [harmonyos_sdk 环境搭建](https://wiki.connect.qq.com/harmonyos_sdk%e7%8e%af%e5%a2%83%e6%90%ad%e5%bb%ba), 并阅读最后的说明\n* 关于在后端使用 code 换取 access_token 的问题, 请参考官方文档: [通过Authorization Code获取Access Token](https://wiki.connect.qq.com/%E4%BD%BF%E7%94%A8authorization_code%E8%8E%B7%E5%8F%96access_token#:~:text=Step2%EF%BC%9A%E9%80%9A%E8%BF%87Authorization%20Code%E8%8E%B7%E5%8F%96Access%20Token) , `redirect_uri` 一般为 `auth://tauth.qq.com/`\n\n项目中 module.json5 的 \"module\" 节点下配置 querySchemes\n\n```json5\n\"querySchemes\": [\n    \"https\",\n    \"qqopenapi\"\n]\n```\n\n在 Ability 的 skills 节点中配置 scheme\n\n```json5\n\"skills\": [\n {\n    \"entities\": [\n      \"entity.system.browsable\"\n    ],\n    \"actions\": [\n      \"ohos.want.action.viewData\"\n    ],\n    \"uris\": [\n      {\n        \"scheme\": \"qqopenapi\", // 接收 QQ 回调数据\n        \"host\": \"102061317\", // 业务申请的互联 appId\n        \"path\": \"auth\",\n        \"linkFeature\": \"Login\",\n      }\n    ]\n  }\n]\n```\n\n### Flutter\n\n|分享类型|说说(图/文/视频)|文本|图片|音乐|视频|网页|\n|:---:|:---:|:---:|:---:|:---:|:---:|:---:|\n|QQ|不支持|不支持|支持|支持|不支持|支持|\n|QZone|支持|不支持|不支持|不支持|不支持|支持|\n\n* 注意\n\n⚠️⚠️⚠️ registerApp 前必须先调用 setIsPermissionGranted [issues/60](https://github.com/RxReader/tencent_kit/issues/60) [issues/79](https://github.com/RxReader/tencent_kit/issues/79)\n\n* 兼容\n\nflutter 2.5 兼容问题 [issues/54](https://github.com/RxReader/tencent_kit/issues/54)\n\n```ruby\npost_install do |installer|\n  installer.pods_project.targets.each do |target|\n    flutter_additional_ios_build_settings(target)\n    # 兼容 Flutter 2.5\n    target.build_configurations.each do |config|\n      # config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'\n      config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'i386 arm64'\n    end\n  end\nend\n```\n\n* 配置\n\n```yaml\ndependencies:\n  tencent_kit: ^${latestTag}\n#  tencent_kit:\n#    git:\n#      url: https://github.com/RxReader/tencent_kit.git\n\ntencent_kit:\n  app_id: ${your tencent app id}\n  universal_link: https://${your applinks domain}/universal_link/${example_app}/qq_conn/${your tencent app id}/ # 可选项目\n```\n\n* 安装（仅iOS）\n\n```shell\n# step.1 安装必要依赖\nsudo gem install plist\n# step.2 切换工作目录，插件里为 example/ios/，普通项目为 ios/\ncd example/ios/\n# step.3 执行脚本\npod install\n```\n\n## 示例\n\n[示例](./example/lib/main.dart)\n\n## Star History\n\n![stars](https://starchart.cc/rxreader/tencent_kit.svg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frxreader%2Ftencent_kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frxreader%2Ftencent_kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frxreader%2Ftencent_kit/lists"}