# react-native-socials-offline

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

Latest version **0.0.1** (published 2020-08-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-socials-offline
pnpm add react-native-socials-offline
yarn add react-native-socials-offline
bun add react-native-socials-offline
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2020-08-17 |
| First published | 2020-08-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 250.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 125 |
| Author | cloned from pierrecapo |
| Maintainers | ta1bbty |
| Keywords | react-native, socials, twitter, instagram, youtube, reddit |

## Links

- npm: https://www.npmjs.com/package/react-native-socials-offline
- Repository: https://github.com/PierreCapo/react-native-socials
- Homepage: https://github.com/PierreCapo/react-native-socials#readme
- Issues: https://github.com/PierreCapo/react-native-socials/issues
- npm.io page: https://npm.io/package/react-native-socials-offline

## Dependencies (7)

- [yarn](https://npm.io/package/yarn.md) ^1.22.4
- [date-fns](https://npm.io/package/date-fns.md) ^2.11.1
- [html-entities](https://npm.io/package/html-entities.md) ^1.3.1
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.11.2
- [oauth-signature](https://npm.io/package/oauth-signature.md) ^1.5.0
- [@types/react-native](https://npm.io/package/@types/react-native.md) ^0.62.1
- [@types/react-native-video](https://npm.io/package/@types/react-native-video.md) ^5.0.1

## Recent versions

- 0.0.1 (latest) — 2020-08-17

## README

# React Native Socials

<p align="center">
<image src="https://github.com/PierreCapo/react-native-socials/raw/master/images/logo_twitter.png" style="margin-right:20px;" />
<image src="https://github.com/PierreCapo/react-native-socials/raw/master/images/logo_instagram.png" style="margin-right:30px;"/>
<image src="https://github.com/PierreCapo/react-native-socials/raw/master/images/logo_rn.png" style="margin-left:30px;"/>
</p>
<p/>
<p align="center">Embedding posts from popular social networks in your react-native app.</p>

## 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](https://github.com/react-native-community/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

| Light                                                                                                         | Dark                                                                                                               |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| <image src="https://github.com/PierreCapo/react-native-socials/raw/master/images/screenshot_instagram.png" /> | <image src="https://github.com/PierreCapo/react-native-socials/raw/master/images/screenshot_instagram_dark.png" /> |

```JSX
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                                                                                                             |
| ----------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| <image src="https://github.com/PierreCapo/react-native-socials/raw/master/images/screenshot_twitter.jpg" /> | <image src="https://github.com/PierreCapo/react-native-socials/raw/master/images/screenshot_twitter_dark.jpg" /> |

```JSX
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](https://developer.twitter.com/en/docs/basics/authentication/oauth-1-0a)                    |
| consumerSecret        | string                       | **Required**        | OAuth 1.0 Twitter secret that is granted when you [register your app on Twitter Portal](https://developer.twitter.com/en/docs/basics/authentication/oauth-1-0a)                 |
| 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                                                                                                                              |

---
_Source: https://npm.io/package/react-native-socials-offline · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
