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 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-sc-share

v1.0.2

Published

this is a share component for react-native

Downloads

6

Readme

react-native-sc-share

集成umeng分享模块,支持微信,微信朋友圈,QQ,QQ朋友圈,支付宝分享

umeng合规文档地址:https://developer.umeng.com/docs/147377/detail/210664

1.安装

$ npm install react-native-sc-share --save

2.手动安装部分

Android

1.微信

1.1 添加回调Activity

在包名目录下创建wxapi文件夹,新建一个名为WXEntryActivity的activity继承WXCallbackActivity

1.2 添加FileProvider

<provider
	android:name="android.support.v4.content.FileProvider"
	android:authorities="${applicationId}.fileprovider"
	android:exported="false"
	android:grantUriPermissions="true">
	<meta-data
		android:name="android.support.FILE_PROVIDER_PATHS"
		android:resource="@xml/filepaths "/>
</provider>	 

在res/xml目录(如果没有xml目录,则新建一个)下,添加文件filepaths.xml,内容如下:

<?xml version="1.0" encoding="utf-8"?>
<paths>
	<root-path name="opensdk_root" path=""/>
	<external-files-path name="umeng_cache" path="umeng_cache/"/>
</paths>

2.qq

2.1 添加回调Activity

在包名目录下创建apshare文件夹,新建一个名为ShareEntryActivity的activity继承ShareCallbackActivity

2.2 添加FileProvider
<provider
	android:name="android.support.v4.content.FileProvider"
	android:authorities="${applicationId}.fileprovider"
	android:exported="false"
	android:grantUriPermissions="true">
	<meta-data
		android:name="android.support.FILE_PROVIDER_PATHS"
		android:resource="@xml/filepaths" />
</provider> 

在res/xml目录(如果没有xml目录,则新建一个)下,添加文件filepaths.xml,内容如下:

<root-path name="opensdk_root" path=""/>
<external-files-path name="opensdk_external" path="Images/tmp"/>
2.3 添加qqappid

在app/build.gradle中添加如下代码:

android {
	defaultConfig {  
		manifestPlaceholders = [qqappid: "qq的appid"]
	}
} 

iOS

3.使用

3.1 引入

import {Share,SHARE_PLATFORM} from 'react-native-share'

3.2 预初始化(隐私协议同意前调用)

Share.preInit({
   appkey:appkey,		//appkey,必填
   channel: channel	//渠道,可选     
});

3.3 初始化(隐私协议同意后调用)

Share.init({
   isDebug:true,					//调试模式是否打开,可选
   appkey:appkey,					//appkey,必填
   wx:{							//微信配置,可选
   	appId: "", 					//appId
   	appSecret:""				//appSecret
   },
   qq:{							//qq配置,可选
   	appId: "",					//appId
   	appSecret:""				//appSecret					
   },
   ali:{							//支付宝配置,可选
   	appId:""					//appId
   }
   	
});

3.4 分享

Share.share({
   title:"",							//标题
   desc:"",							//描述
   url:"",								//链接	
   img:"",								//图片
   platform:SHARE_PLATFORM.WEIXIN,		//平台	
   wx:{								//微信小程序配置,可选
   	miniId:"", 						//小程序id
   	path:""							//小程序路径
   },
   qq: {                            	//QQ小程序配置,可选
   	miniId: "",						//小程序id
   	path: "",						//小程序路径
   }
}).then(res=>{
   console.log(res)
}).catch(err=>{
   console.log(err)
})

3.5 多个平台分享弹窗

Share.shareWithPanel({
   title:"",							//标题
   desc:"",							//描述
   url:"",								//链接	
   img:"",								//图片
   platforms:[SHARE_PLATFORM.WEIXIN,SHARE_PLATFORM.WEIXIN_CIRCLE,SHARE_PLATFORM.ALIPAY, SHARE_PLATFORM.QQ], 				 //需要显示的平台	
   wx:{								//微信小程序配置,可选
   	miniId:"", 						//小程序id
   	path:""							//小程序路径
   },
   qq: {                            	//QQ小程序配置,可选
   	miniId: "",						//小程序id
   	path: "",						//小程序路径
   },
   ali:{								//支付宝小程序配置,可选	
   	scheme: string;					//小程序scheme,会替换url,场景:分享链接跳转支付宝小程序指定页面
   }
}).then(res=>{
   console.log(res)
}).catch(err=>{
   console.log(err)
})