This repository has been archived by the owner on Apr 2, 2021. It is now read-only.
Releases: facebookarchive/react-native-fbsdk
Releases · facebookarchive/react-native-fbsdk
0.9.0
0.8.0
General improvements and bug fixes
0.7.0
0.6.0
Added:
- add promoCode/promoText to AppInviteContent
- add API for setPushNotificationsDeviceToken (iOS)
setPushNotificationsRegistrationId (Android)
Fixed:
- fix login button cropped
- fix android demo app
Modified:
- update support library to 25.0.0
- update from View.propTypes to ViewPropTypes
- update peer dependency to react-native 0.44.0
0.5.0
0.4.0
0.3.0
We've set up the Facebook Platform Bug Tool for react-native-fbsdk. Please report bugs or issues to https://developers.facebook.com/bugs/
Added
- Now you can run ios_setup.js script to set up the iOS project. Note that you need to create a Facebook App to get the Facebook ID and App Name first. After running the script, complete the step
Connect App Delegate
in Getting Started guide and you're good to go.
Bug fixes
- Fix
Promise
type for Flow 0.26 and above. - Fix framework search path for iOS project.
- Update Android and iOS folder name to lowercase to unbreak rnpm for case-sensitive system.
- Add
ShareApi.canShare()
for iOS.
Modified
- Update Android Build Tool version to 23.0.1.
0.2.1
Bug fixes
-
Tweak FRAMEWORK_SEARCH_PATHS to support finding local FBSDK frameworks. See issue #181
You can now include the iOS SDK in your app's project following the steps:$ rnpm install react-native-fbsdk $ mkdir ios/Frameworks #make a local folder for the FBSDK frameworks $ curl -#L https://origincache.facebook.com/developers/resources/?id=facebook-ios-sdk-current.zip | bsdtar -xf- -C ./ios/Frameworks; #download the FBSDK $ npm install xcode; $ curl https://gist.githubusercontent.com/chrisp-fb/ade0baca1391982f97e2fbc0ad73b934/raw/d3d81a38d2465f8e820285a4a5f5656ef5f9c5a9/fbsdk-setup.js | node;
Now you can follow the Getting Started Guide to configure xcode project, connect application delegate and use the sdk.
0.2.0
Deprecated
AppEventsLogger.deactivateApp()
andAppEventsLogger.onContextStop
are deprecated.
To useAppEventsLogger
, add a call toAppEventsLogger.activateApp()
from theonCreate
method in yourApplication
class. Note that you need to create the class yourself.
YouronCreate
method in theApplication
class should look like this:
import com.facebook.appevents.AppEventsLogger;
import com.facebook.FacebookSdk;
public class MyApplication extends Application {
// Updated your class body:
@Override
public void onCreate() {
super.onCreate();
// Initialize the SDK before executing any other operations.
FacebookSdk.sdkInitialize(getApplicationContext());
// Use AppEventsLogger to log custom events.
AppEventsLogger.activateApp(this);
}
}
Breaking Changes
- Merge separate iOS projects into one single project.
- Drop support for Cocoapods. Adapt to rnpm for native side setup.
Upgrade to 0.2.0
If you're already using 0.1.0, here're the steps to upgrade to 0.2.0.
Android (Using Facebook Android SDK 4.11.+)
- You can safely remove the
onCreate()
,onResume
,onPause
, andonStop
fromMainActivity.java
. - Add a call to
FacebookSdk.sdkInitialize
fromonCreate()
in your Application class as described in _Deprecated_ section.
iOS (If you're happy with not using Cocoapods)
- Run the following command to clean up the pods from the project.
$ sudo gem install cocoapods-deintegrate cocoapods-clean
$ pod deintegrate
$ pod clean
$ rm Podfile
- Reinstall react-native dependency into the app project.
// Reinstall the node_modules by `npm install --save react-native` first if the following command fail
$ react-native upgrade // Only choose to overwrite the xcodeproj file to get the static libraries.
- Reinstall react-native-fbsdk 0.2.0.
// In package.json, change the 'react-native-fbsdk' version to be "^0.2.0"
$ rnpm install react-native-fbsdk
Include Facebook iOS SDK inside your project
Here're the set up instructions to keep the Facebook iOS SDK inside your project:
- Create a FacebookSDK directory under node_modules/react-native-fbsdk/iOS/. We'll put the SDK here.
- Download and unzip FacebookSDK archive, copy FBSDKCoreKit.framework, FBSDKLoginKit.framework and FBSDKShareKit.framework and paste it into node_modules/react-native-fbsdk/iOS/FacebookSDK.
- Create a new group Frameworks in the Project navigator and drag the FBSDKCoreKit.framework, FBSDKLoginKit.framework and FBSDKShareKit.framework into the Frameworks group.
- Tell the RCTFBSDK target where to search for the SDK by adding
$(SRCROOT)/FacebookSDK
in the Frameworks Search Path section under the target RCTFBSDK's Build Settings. - Tell your project where to search for the SDK by adding
$(SRCROOT)/../node_modules/react-native-fbsdk/iOS/FacebookSDK
in the Frameworks Search Path section under the app target Build Settings. - Follow the Getting Started Guide to Create a Facebook App, Configure Facebook App Settings for iOS, Configure Xcode Project, Connect Application Delegate. Now you can start using the SDK.
Bug fixes
- Fix import statement to be compatible with react-native 0.25.1+.
- Fix Flow error so that
LoginButton
props can be optional. - Fix Flow error of
LoginButton
proponLoginFinished
. - Fix
ShareOpenGraphContent
builder in iOS. - Fix missing
ShareContent
inMessageDialog.canShow()
. - Fix
LoginButton
callback gets called multiple times - Fix custom app events doesn't show up in App Analytic Dashboard.
0.1.0
0.1.0 official release.
New Features
- Add support for quote sharing in link share.
- Add support for predefined hashtag in share dialog.
Modified
- Upgrade facebook-android-sdk dependency from v4.8.0 to latest release (v4.11 or above).
- Upgrade react-native dependency from v0.20.+ to latest release.