npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@byron-react-native/qqopensdk

v1.0.1

Published

React Native Qq Open Sdk

Downloads

7

Readme

react-native-qq-open-sdk

*暂时不建议使用,目前只做了登录

Getting started

$ yarn add @byron-react-native/qqopensdk

iOS

// (1)配置URL Scheme
<>在XCode中,选择你的工程设置项,选中“TARGETS”一栏,在“info”标签栏的“URL type”添加一条新的“URL scheme”,新的scheme = tencent + appid。如果您使用的是XCode3或者更低的版本,则需要在plist文件中添加。</>

// (2)配置LSApplicationQueriesSchemes
<key>LSApplicationQueriesSchemes</key>
	<array>
		<string>mqq://</string>
		<string>mqqapi://</string>
		<!-- 更多请参考 https://wiki.connect.qq.com/ios_sdk%e7%8e%af%e5%a2%83%e6%90%ad%e5%bb%ba -->
    <string>tim://</string>
    <string>mqqopensdknopasteboard://</string>
    <string>mqqopensdkapiV2://</string>
    <string>mqqconnect</string>
    <string>mqqopensdkdataline</string>
    <string>mqqopensdkgrouptribeshare</string>
    <string>mqqopensdkfriend</string>
    <string>mqqopensdkapi</string>
    <string>mqqopensdkapiV2</string>
	</array>

// (3)AppDelegate.mm 添加
#import "WXApiManager.h" // 如果有集成微信
#import "QQApiManager.h"

// weixin qq
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
  if ([TencentOAuth CanHandleOpenURL:url]) {
    return [TencentOAuth HandleOpenURL:url];
  }
  // 如果有集成微信
  return [WXApi handleOpenURL:url delegate:[WXApiManager sharedManager]]; 
}

- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void(^)(NSArray<id<UIUserActivityRestoring>> * __nullable restorableObjects))restorationHandler
{
  if ([TencentOAuth CanHandleUniversalLink:userActivity.webpageURL]) {
    return [TencentOAuth HandleUniversalLink:userActivity.webpageURL];
  }
  // 如果有集成微信
  return [WXApi handleOpenUniversalLink:userActivity delegate:[WXApiManager sharedManager]];
}

Android

// app/build.gradle add
android {
  defaultConfig {
    manifestPlaceholders = [
      QQ_APPID: "QQ appId"
    ]
  }
}

Api

/**
 * 初始化TencentOAuth对象
 * @param appId 不可为nil,第三方应用在互联开放平台申请的唯一标识
 */
static initWithAppId(appId: string): void;
/**
 * 检测是否支持分享
 * 如果当前已安装QQ且QQ版本支持API调用 或者 当前已安装TIM且TIM版本支持API调用则返回YES,否则返回NO
 */
static isQQInstalled(): Promise<boolean>;
/**
 * 登录授权
 * @param permissions 授权信息列
 * @default ['get_user_info']
 */
static authorize(
  permissions?: string[]
): Promise<undefined | Partial<QQOpenSDKAuthorize>>;
/**
 * 增量授权,因用户没有授予相应接口调用的权限,需要用户确认是否授权
 * @param permissions 需增量授权的信息列表
 */
static incrAuthWithPermissions(permissions: string[]): Promise<boolean>;
/**
 * 重新授权,因token废除或失效导致接口调用失败,需用户重新授权
 * @param permissions 授权信息列表,同登录授权
 */
static reauthorizeWithPermissions(permissions: string[]): Promise<boolean>;
/**
 * 退出登录(退出登录后,TecentOAuth失效,需要重新初始化)
 */
static logout(): void;