File tree Expand file tree Collapse file tree 4 files changed +11
-12
lines changed Expand file tree Collapse file tree 4 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ PhoneGap Build documentation available [here] (https://build.phonegap.com/plugin
34
34
35
35
### Login
36
36
37
- ` facebookConnectPlugin.login(Function success, Function failure) `
37
+ ` facebookConnectPlugin.login(Array strings of permissions, Function success, Function failure) `
38
38
39
39
** NOTE** : Developers should call ` facebookConnectPlugin.browserInit(<appId>) ` before login - ** Web App ONLY** (see [ Web App Guide] ( platforms/web/README.md ) )
40
40
Original file line number Diff line number Diff line change @@ -54,12 +54,9 @@ Follow the steps below:
54
54
55
55
cordova -d plugin add https://github.com/phonegap/phonegap-facebook-plugin.git --variable APP_ID="123456789" --variable APP_NAME="myApplication"
56
56
57
- // add FacebookLib
58
- echo "android.library.reference.2=FacebookLib" >> platforms/android/project.properties
57
+ android update project --subprojects --path "platforms/android" --target android-19 --library "CordovaLib"
59
58
60
- cp platforms/android/local.properties platforms/android/FacebookLib
61
-
62
- android update project -p platforms/android/
59
+ android update project --subprojects --path "platforms/android" --target android-19 --library "FacebookLib"
63
60
64
61
cd platforms/android/
65
62
Original file line number Diff line number Diff line change 2
2
<plugin xmlns =" http://www.phonegap.com/ns/plugins/1.0"
3
3
xmlns : android =" http://schemas.android.com/apk/res/android"
4
4
id =" com.phonegap.plugins.facebookconnect"
5
- version =" 0.7.0 " >
5
+ version =" 0.7.1 " >
6
6
7
7
<name >Facebook Connect</name >
8
8
Original file line number Diff line number Diff line change @@ -167,11 +167,13 @@ if (!window.cordova) {
167
167
168
168
// Bake in the JS SDK
169
169
( function ( ) {
170
- console . log ( "launching FB SDK" )
171
- var e = document . createElement ( 'script' ) ;
172
- e . src = document . location . protocol + '//connect.facebook.net/en_US/sdk.js' ;
173
- e . async = true ;
174
- document . getElementById ( 'fb-root' ) . appendChild ( e ) ;
170
+ if ( ! window . FB ) {
171
+ console . log ( "launching FB SDK" )
172
+ var e = document . createElement ( 'script' ) ;
173
+ e . src = document . location . protocol + '//connect.facebook.net/en_US/sdk.js' ;
174
+ e . async = true ;
175
+ document . getElementById ( 'fb-root' ) . appendChild ( e ) ;
176
+ }
175
177
} ( ) ) ;
176
178
177
179
}
You can’t perform that action at this time.
0 commit comments