Giter Club home page Giter Club logo

react-native-fabric-twitterkit's Introduction

react-native-fabric-twitterkit

React Native Fabric Twitter-kit support for iOS and Android

Use 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

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

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

+ 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

+ 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:

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);
	});

}

react-native-fabric-twitterkit's People

Contributors

aby040 avatar cmcewen avatar farazs avatar hazelw avatar henrytndrly avatar huangmr avatar mehcode avatar pdruart avatar prtkkmrsngh avatar tkporter avatar yamade avatar

Watchers

 avatar  avatar

Forkers

tapnovel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.