Skip to content

Commit db623cc

Browse files
committed
react-native-fbsdk-0.7.0
1 parent 9f36747 commit db623cc

22 files changed

+184
-174
lines changed

BUCK

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include_defs("xplat//js/JS_DEFS")
1+
include_defs("xplat//js/JS_DEFS.bzl")
22

33
js_library(
44
name = "react-native-fbsdk",

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,18 +92,17 @@ public class MainApplication extends Application implements ReactApplication {
9292
//...
9393
```
9494

95-
Override `onCreate()` method
95+
If you want to use AppEventsLogger to log events, override `onCreate()` method and add
9696
```java
9797
@Override
9898
public void onCreate() {
9999
super.onCreate();
100-
FacebookSdk.sdkInitialize(getApplicationContext());
101-
// If you want to use AppEventsLogger to log events.
102100
AppEventsLogger.activateApp(this);
101+
//...
103102
}
104103
```
105104

106-
Register sdk package in method `getPackages()`.
105+
Register SDK package in method `getPackages()`.
107106
```java
108107
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
109108
@Override
@@ -137,7 +136,7 @@ public class MainActivity extends ReactActivity {
137136
//...
138137
```
139138

140-
Before you can run the project, follow the [Getting Started Guide](https://developers.facebook.com/docs/android/getting-started/) for Facebook Android SDK to set up a Facebook app. You can skip the build.gradle changes since that's taken care of by the rnpm link step above, and the step of calling `FacebookSdk.sdkInitialize`. But **make sure** you follow the rest of the steps such as updating `strings.xml` and `AndroidManifest.xml`.
139+
Before you can run the project, follow the [Getting Started Guide](https://developers.facebook.com/docs/android/getting-started/) for Facebook Android SDK to set up a Facebook app. You can skip the build.gradle changes since that's taken care of by the rnpm link step above, but **make sure** you follow the rest of the steps such as updating `strings.xml` and `AndroidManifest.xml`.
141140

142141
#### 3.2 iOS project
143142
The react-native-fbsdk has been linked by rnpm, the next step will be downloading and linking the native Facebook SDK for iOS.

android/build.gradle

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,16 @@ android {
1717
}
1818

1919
dependencies {
20-
compile 'com.android.support:appcompat-v7:25.0.0'
20+
compile 'com.android.support:appcompat-v7:27.0.2'
2121
compile 'com.facebook.react:react-native:+' // support react-native-v0.22-rc+
22-
compile('com.facebook.android:facebook-android-sdk:4.+')
22+
compile 'com.facebook.android:facebook-android-sdk:4.+'
23+
}
24+
25+
repositories {
26+
mavenCentral()
27+
jcenter()
28+
maven {
29+
url 'https://maven.google.com/'
30+
name 'Google'
31+
}
2332
}

android/src/main/java/com/facebook/reactnative/androidsdk/FBSDKPackage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
public class FBSDKPackage implements ReactPackage {
3636

37-
public static final String VERSION_TO_RELEASE = "ReactNative-v0.6.3";
37+
public static final String VERSION_TO_RELEASE = "ReactNative-v0.7.0";
3838

3939
private CallbackManager mCallbackManager;
4040
public FBSDKPackage(CallbackManager callbackManager) {

bin/ios_setup.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
const AdmZip = require('adm-zip');
2121
const ProgressBar = require('progress');
2222

23-
const fall = require('fastfall')();
23+
const fall = require('fastfall');
2424
const fs = require('fs');
2525
const got = require('got');
2626
const path = require('path');
@@ -139,7 +139,7 @@ function updatePlist (files, next) {
139139
plistObject.CFBundleURLTypes = [{CFBundleURLSchemes: ['fb' + appId]}];
140140
plistObject.FacebookAppID = appId;
141141
plistObject.FacebookDisplayName = appName;
142-
plistObject.LSApplicationQueriesSchemes = ['fbapi', 'fb-messenger-api', 'fbauth2', 'fbshareextension'];
142+
plistObject.LSApplicationQueriesSchemes = ['fbapi', 'fb-messenger-share-api', 'fbauth2', 'fbshareextension'];
143143
plistObject.NSLocationWhenInUseUsageDescription = '';
144144
fs.writeFileSync(plistFilePath, plist.build(plistObject));
145145
console.log('Finished updating ' + plistFilePath);

ios/RCTFBSDK/core/RCTFBSDKInitializer.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ @implementation RCTFBSDKInitializer
4040
- (instancetype)init
4141
{
4242
if ((self = [super init])) {
43-
[FBSDKSettings setUserAgentSuffix:@"ReactNative-v0.6.3"];
43+
[FBSDKSettings setUserAgentSuffix:@"ReactNative-v0.7.0"];
4444
}
4545
return self;
4646
}

js/FBAppEventsLogger.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ module.exports = {
125125
},
126126

127127
/**
128-
* For Android only, sets and sends registration id to register the current app for push notifications.
129-
* @platform Android
130-
*/
128+
* For Android only, sets and sends registration id to register the current app for push notifications.
129+
* @platform Android
130+
*/
131131
setPushNotificationsRegistrationId(registrationId: string) {
132132
AppEventsLogger.setPushNotificationsRegistrationId(registrationId);
133133
},

js/FBGraphRequest.js

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
/**
2-
* Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
3-
*
4-
* You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
5-
* copy, modify, and distribute this software in source code or binary form for use
6-
* in connection with the web services and APIs provided by Facebook.
7-
*
8-
* As with any software that integrates with the Facebook platform, your use of
9-
* this software is subject to the Facebook Developer Principles and Policies
10-
* [http://developers.facebook.com/policy/]. This copyright notice shall be
11-
* included in all copies or substantial portions of the software.
12-
*
13-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15-
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16-
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17-
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18-
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19-
*
20-
* @flow
21-
* @format
22-
*/
2+
* Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
3+
*
4+
* You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
5+
* copy, modify, and distribute this software in source code or binary form for use
6+
* in connection with the web services and APIs provided by Facebook.
7+
*
8+
* As with any software that integrates with the Facebook platform, your use of
9+
* this software is subject to the Facebook Developer Principles and Policies
10+
* [http://developers.facebook.com/policy/]. This copyright notice shall be
11+
* included in all copies or substantial portions of the software.
12+
*
13+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19+
*
20+
* @flow
21+
* @format
22+
*/
2323

2424
'use strict';
2525

js/FBGraphRequestManager.js

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
/**
2-
* Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
3-
*
4-
* You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
5-
* copy, modify, and distribute this software in source code or binary form for use
6-
* in connection with the web services and APIs provided by Facebook.
7-
*
8-
* As with any software that integrates with the Facebook platform, your use of
9-
* this software is subject to the Facebook Developer Principles and Policies
10-
* [http://developers.facebook.com/policy/]. This copyright notice shall be
11-
* included in all copies or substantial portions of the software.
12-
*
13-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15-
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16-
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17-
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18-
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19-
*
20-
* @flow
21-
* @format
22-
*/
2+
* Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
3+
*
4+
* You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
5+
* copy, modify, and distribute this software in source code or binary form for use
6+
* in connection with the web services and APIs provided by Facebook.
7+
*
8+
* As with any software that integrates with the Facebook platform, your use of
9+
* this software is subject to the Facebook Developer Principles and Policies
10+
* [http://developers.facebook.com/policy/]. This copyright notice shall be
11+
* included in all copies or substantial portions of the software.
12+
*
13+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19+
*
20+
* @flow
21+
* @format
22+
*/
2323

2424
'use strict';
2525

js/FBShareButton.js

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
/**
2-
* Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
3-
*
4-
* You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
5-
* copy, modify, and distribute this software in source code or binary form for use
6-
* in connection with the web services and APIs provided by Facebook.
7-
*
8-
* As with any software that integrates with the Facebook platform, your use of
9-
* this software is subject to the Facebook Developer Principles and Policies
10-
* [http://developers.facebook.com/policy/]. This copyright notice shall be
11-
* included in all copies or substantial portions of the software.
12-
*
13-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15-
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16-
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17-
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18-
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19-
*
20-
* @flow
21-
* @format
22-
*/
2+
* Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
3+
*
4+
* You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
5+
* copy, modify, and distribute this software in source code or binary form for use
6+
* in connection with the web services and APIs provided by Facebook.
7+
*
8+
* As with any software that integrates with the Facebook platform, your use of
9+
* this software is subject to the Facebook Developer Principles and Policies
10+
* [http://developers.facebook.com/policy/]. This copyright notice shall be
11+
* included in all copies or substantial portions of the software.
12+
*
13+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19+
*
20+
* @flow
21+
* @format
22+
*/
2323

2424
'use strict';
2525

0 commit comments

Comments
 (0)