react-native-fb-like-button
An component for react-native.
Add it to your project
- Run
npm install react-native-fb-like-button --save
- Make sure to follow all 7 steps here first: https://developers.facebook.com/docs/ios/getting-started#xcode. You don't have to download the SDKs Frameworks, they are in this npm package, just drag them into your project from finder.
- Open your project in XCode, right click on
Libraries
and clickAdd Files to "Your Project Name"
then add FbLikeButtonView.xcodeproj to your project. - Add
libFbLikeButtonView.a
toBuild Phases -> Link Binary With Libraries
- Whenever you want to use it within React code now you can:
var FbLikeButton = require('react-native-fb-like-button').FbLikeButton;
Usage
// Within your render function:<FbLikeButton objectID="https://developers.facebook.com"/>
If you need to listen for the an event when the user likes the object, add this listener in your
{ DeviceEventEmitter; DeviceEventEmitter; }
MIT Licensed