Skip to content

Commit 26c2755

Browse files
author
aogilvie
committed
Merge branch 'master' of github.com:wizcorp/phonegap-facebook-plugin
2 parents 88fdab7 + 45f1c78 commit 26c2755

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ PhoneGap Build documentation available [here] (https://build.phonegap.com/plugin
3434

3535
### Login
3636

37-
`facebookConnectPlugin.login(Function success, Function failure)`
37+
`facebookConnectPlugin.login(Array strings of permissions, Function success, Function failure)`
3838

3939
**NOTE** : Developers should call `facebookConnectPlugin.browserInit(<appId>)` before login - **Web App ONLY** (see [Web App Guide](platforms/web/README.md))
4040

platforms/android/README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,9 @@ Follow the steps below:
5454

5555
cordova -d plugin add https://github.com/phonegap/phonegap-facebook-plugin.git --variable APP_ID="123456789" --variable APP_NAME="myApplication"
5656

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"
5958

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"
6360

6461
cd platforms/android/
6562

plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
id="com.phonegap.plugins.facebookconnect"
5-
version="0.7.0">
5+
version="0.7.1">
66

77
<name>Facebook Connect</name>
88

www/js/facebookConnectPlugin.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,13 @@ if (!window.cordova) {
167167

168168
// Bake in the JS SDK
169169
(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+
}
175177
}());
176178

177179
}

0 commit comments

Comments
 (0)