applicious_utils 0.1.20 → 0.1.21
Sign up to get free protection for your applications and to get access to all the features.
@@ -7,36 +7,35 @@ class AppliciousFacebook extends AppliciousCore
|
|
7
7
|
FB_STATUS: ''
|
8
8
|
|
9
9
|
constructor: ->
|
10
|
-
|
10
|
+
@log 'Applicious [AP::FB] Loaded'
|
11
11
|
|
12
12
|
|
13
|
-
init: (
|
14
|
-
@
|
15
|
-
AP.log 'Initialised [AP::FB]', @FB_APP_ID
|
13
|
+
init: (@FB_APP_ID) ->
|
14
|
+
@log 'Initialised [AP::FB]', @FB_APP_ID
|
16
15
|
|
17
16
|
login: (permissions = '', callback) ->
|
18
|
-
responseHandler = (response)
|
17
|
+
responseHandler = (response) =>
|
18
|
+
|
19
19
|
if response.session
|
20
20
|
try
|
21
21
|
@FB_STATUS = response.status
|
22
22
|
@FB_SESSION = response.session
|
23
23
|
@FB_UID = response.session.uid
|
24
24
|
catch error
|
25
|
-
|
25
|
+
@log 'Error', error
|
26
26
|
|
27
|
-
if response.session
|
28
27
|
if permissions && permissions != ''
|
29
28
|
if permissions == response.perms
|
30
|
-
|
29
|
+
@log 'Login accepted - Permissions Accepted', response
|
31
30
|
callback true, response
|
32
31
|
else
|
33
|
-
|
32
|
+
@log 'Login rejected - Permissions Rejected', response
|
34
33
|
callback false, response
|
35
34
|
else
|
36
|
-
|
35
|
+
@log 'Login accepted - No Permissions', response
|
37
36
|
callback true, response
|
38
37
|
else
|
39
|
-
|
38
|
+
@log 'Login rejected', response
|
40
39
|
callback false, response
|
41
40
|
return
|
42
41
|
|