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

react-native-socials

v0.0.25

Published

A react-native library which displays content from popular social networks

Downloads

3,186

Readme

React Native Socials

Install

The library is still in version 0, be cautious when you upgrade it! 🚧

yarn add react-native-socials

It is also needed to add react-native-video in your project because social components usually contains embeded videos. See react-native-video library for more information about the installation.

Finally, it is recommended to wrap those components into PureComponent because some of them can be costly to rerender (videos for instance).

Instagram

WARNING as of summer 2020, Instagram has added a firewall to prevent scripts to access its unofficial API. It's planned in the migrate and use the official Instagram API.

| Light | Dark | | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | | | |

import {Instagram} from "react-native-socials";

<Instagram id="B8U12TXAmK-" >

Props:

| Name | Type | Default | Description | | --------------------- | ----------- | --------------------------------------------- | ------------------------------------------------ | | id | string | Required | Instagram post id | | darkMode | bool | false | Toggle dark mode | | language | string enum | "en" - "de" - "fr" - "es" - "pt" - "it" -"ru" | Pick language for metadata of the post | | containerBorderRadius | number | 0 | Border radius of the container of the UI element |

Twitter

| Light | Dark | | ----------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | | | |

import {Twitter} from "react-native-socials";

<Twitter
consumerKey=""
consumerSecret=""
id="1251870993628434433"
>

Unlike Instagram, the Twitter API is not open. It is needed that you register your app (free version) to the Twitter portal to be able to fetch Twitter posts.

Props:

| Name | Type | Default | Description | | -------------------------- | ---------------------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | id | string | Required | Twitter post id | | consumerKey | string | Required | OAuth 1.0 Twitter key that is granted when you register your app on Twitter Portal | | consumerSecret | string | Required | OAuth 1.0 Twitter secret that is granted when you register your app on Twitter Portal | | darkMode | bool | false | Toggle dark mode | | language | string enum | "en" | Pick language for metadata of the post | | onHashTagPress | (hashtag:string) => void | Redirect to webpage | Overrides default behavior when pressing an hashtag in a Tweet | | onUserMentionPress | (userMention:string) => void | Redirect to webpage | Overrides default behavior when pressing a user mention in a Tweet | | onLinkPress | (link:string) => void | Redirect to webpage | Overrides default behavior when pressing a link in a Tweet | | cornerRadius | string enum | "small" | Chose the corner radius of UI elements in a post. Typically a post taking the whole width of the screen should have "big" whereas a post in a card should use the "small" value | | containerBorderRadius | number | 0 | Border radius of the container of the UI element | | onTweetPress | (tweetId:string) => void | Redirect to webpage | Overrides default behavior when pressing the tweet | | useCustomTweetExtendedData | Object | null | Use this prop when you have already fetched the Twitter data in the app, and you want to call the component with the Twitter data as prop that you already have fetched. This object needs to be exactly the response of the call to the Twitter API with the ?tweet_mode=extended parameter, like: https://api.twitter.com/1.1/statuses/show/1265128375707983872.json?tweet_mode=extended |