cordova-plugin-facebook4
Advanced tools
Comparing version 1.2.1 to 1.2.2
{ | ||
"name": "cordova-plugin-facebook4", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Cordova Facebook SDK 4 Plugin", | ||
@@ -5,0 +5,0 @@ "cordova": { |
@@ -95,3 +95,3 @@ # cordova-plugin-facebook4 | ||
method: "share", | ||
link: "http://example.com", | ||
href: "http://example.com", | ||
caption: "Such caption, very feed.", | ||
@@ -98,0 +98,0 @@ description: "Much description", |
/* global FB */ | ||
var isInited = false | ||
// Bake in the JS SDK | ||
insertSdk() | ||
exports.getLoginStatus = function getLoginStatus (s, f) { | ||
@@ -108,8 +105,4 @@ if (!assertInited()) return printError(f, new Error('init not called with valid version')) | ||
window.fbAsyncInit = function fbAsyncInit () { | ||
isInited = true | ||
if (typeof s === 'function') s() | ||
} | ||
version = version || 'v2.4' | ||
function _actualInit () { | ||
version = version || 'v2.4' | ||
FB.init({ | ||
@@ -120,10 +113,10 @@ appId: appId, | ||
}) | ||
isInited = true | ||
if (typeof s === 'function') s() | ||
} | ||
// deal with race condition of calling FB.init before loading the SDK | ||
var interval = setInterval(function () { | ||
if (!window.FB) return | ||
clearInterval(interval) | ||
_actualInit() | ||
}, 200) | ||
// Bake in the JS SDK | ||
insertSdk() | ||
} | ||
@@ -130,0 +123,0 @@ |
28833323
522