# react-native-fabric-twitterkit

> A React Native library for Sending an SMS with Callback

Latest version **0.3.0** (published 2018-01-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-fabric-twitterkit
pnpm add react-native-fabric-twitterkit
yarn add react-native-fabric-twitterkit
bun add react-native-fabric-twitterkit
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2018-01-22 |
| First published | 2016-08-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 37 |
| Author | Trevor Porter |
| Maintainers | tkporter |
| Keywords | react-native, react-component, react-native-component, react, mobile, ios, android, fabric, twitter, twitterkit, twitter-kit, twittercompose, callback, completed, cool |

## Links

- npm: https://www.npmjs.com/package/react-native-fabric-twitterkit
- Repository: https://github.com/tkporter/react-native-fabric-twitterkit
- Issues: https://github.com/tkporter/react-native-fabric-twitterkit/issues
- npm.io page: https://npm.io/package/react-native-fabric-twitterkit

## Recent versions

- 0.3.0 (latest) — 2018-01-22
- 0.2.0 — 2017-08-17
- 0.1.3 — 2017-04-06
- 0.1.2 — 2017-03-31
- 0.1.1 — 2017-02-02
- 0.1.0 — 2016-12-28
- 0.0.1 — 2016-08-05

## README

# react-native-fabric-twitterkit
React Native Fabric Twitter-kit support for iOS and Android

Use [react-native-fabric](https://github.com/corymsmith/react-native-fabric) for Answers and Crashlytics

# Installation:

```
npm install react-native-fabric-twitterkit --save
rnpm link react-native-fabric-twitterkit
```

## iOS

Follow the official Fabric iOS instructions on [Fabric.io](https://docs.fabric.io/apple/twitter/installation.html)

## Android

Note: If using RN version < v0.47, use react-native-fabric-twitterkit <= v0.1.3

Follow "Set Up Kit" from official Fabric Android docs at [Fabric.io](https://docs.fabric.io/android/twitter/compose-tweets.html)

Navigate to your `MainActivity.java` somewhere in `MyApp/android/app/src/main/java/...../MainActivity.java`

```diff
+ import com.tkporter.fabrictwitterkit.FabricTwitterKitPackage;

...

public class MainActivity extends ReactActivity {

	.....

	@Override
	public void onActivityResult(int requestCode, int resultCode, Intent data) {
+ 		FabricTwitterKitPackage.getInstance().onActivityResult(this, requestCode, resultCode, data);
	}

	...

}
```

Go to your `MyAppApplication.java` inside the same folder as `MainActivity.java`

```diff
+ import com.tkporter.fabrictwitterkit.FabricTwitterKitPackage;

...

public final MyApp extends ....... {

	...

	@Override List<ReactPackage> getPackages() {
		return Arrays.<ReactPackage>asList(
			...
+			FabricTwitterKitPackage.getInstance(),
			...
		);
	}

	...

}
```

# Usage

This package has iOS and Android functionality, so you can use the same call for each platform.

There are lots of functions, and not a lot of README writing time. Check out `FabricTwitterKit/FabricTwitterKit.m` and `Android/src/main/java/com/tkporter/fabrictwitterkit/FabricTwitterKitModule.java` for the other supported functions! :)

ComposeTweet example:

```JavaScript
import FabricTwitterKit from 'react-native-fabric-twitterkit'

...

mySuperCoolFunction() {

	FabricTwitterKit.composeTweet({
		body: 'react-native-fabric-twitterkit is awesome!'
	}, (completed, cancelled, error) => {
		console.log('completed: ' + completed + ' cancelled: ' + cancelled + ' error: ' + error);
	});

}

```

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