facebook-stub 0.0.1.2 → 0.0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/facebook-stub.js +10 -3
- data/lib/facebook-stub/version.rb +1 -1
- data/src/facebook.js +10 -3
- metadata +3 -3
data/facebook-stub.js
CHANGED
@@ -16,14 +16,20 @@
|
|
16
16
|
console.log('FB.login() called when user is already connected.');
|
17
17
|
if (FBWorld.state('connected')) {
|
18
18
|
callback(getStatus('standard'));
|
19
|
-
|
19
|
+
}else{
|
20
|
+
promptToConnect(options, callback)
|
20
21
|
}
|
22
|
+
}else{
|
23
|
+
promptToLogin(options, callback)
|
21
24
|
}
|
22
|
-
|
25
|
+
}
|
26
|
+
|
27
|
+
// simulate prompt to login
|
28
|
+
function promptToLogin(options, callback) {
|
23
29
|
FBWorld.beingPromptedToLogin = true;
|
24
30
|
FBWorld.beingPromptedToLoginOptions = options;
|
25
31
|
FBWorld.beingPromptedToLoginCallback = callback;
|
26
|
-
}
|
32
|
+
};
|
27
33
|
|
28
34
|
|
29
35
|
// simulates resolving a login prompt in one of three ways
|
@@ -70,6 +76,7 @@
|
|
70
76
|
|
71
77
|
// connect to app
|
72
78
|
|
79
|
+
// simulate prompt to connect
|
73
80
|
function promptToConnect(options, callback) {
|
74
81
|
FBWorld.beingPromptedToConnect = true;
|
75
82
|
FBWorld.beingPromptedToConnectOptions = options;
|
data/src/facebook.js
CHANGED
@@ -16,14 +16,20 @@
|
|
16
16
|
console.log('FB.login() called when user is already connected.');
|
17
17
|
if (FBWorld.state('connected')) {
|
18
18
|
callback(getStatus('standard'));
|
19
|
-
|
19
|
+
}else{
|
20
|
+
promptToConnect(options, callback)
|
20
21
|
}
|
22
|
+
}else{
|
23
|
+
promptToLogin(options, callback)
|
21
24
|
}
|
22
|
-
|
25
|
+
}
|
26
|
+
|
27
|
+
// simulate prompt to login
|
28
|
+
function promptToLogin(options, callback) {
|
23
29
|
FBWorld.beingPromptedToLogin = true;
|
24
30
|
FBWorld.beingPromptedToLoginOptions = options;
|
25
31
|
FBWorld.beingPromptedToLoginCallback = callback;
|
26
|
-
}
|
32
|
+
};
|
27
33
|
|
28
34
|
|
29
35
|
// simulates resolving a login prompt in one of three ways
|
@@ -70,6 +76,7 @@
|
|
70
76
|
|
71
77
|
// connect to app
|
72
78
|
|
79
|
+
// simulate prompt to connect
|
73
80
|
function promptToConnect(options, callback) {
|
74
81
|
FBWorld.beingPromptedToConnect = true;
|
75
82
|
FBWorld.beingPromptedToConnectOptions = options;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: facebook-stub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 77
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
9
|
- 1
|
10
|
-
-
|
11
|
-
version: 0.0.1.
|
10
|
+
- 3
|
11
|
+
version: 0.0.1.3
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Change.org
|