Package Exports
- react-native-fabric-twitterkit
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-fabric-twitterkit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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-twitterkitiOS
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);
});
}