File tree 1 file changed +26
-22
lines changed
Assets/FBAuthKit/Example/Scripts
1 file changed +26
-22
lines changed Original file line number Diff line number Diff line change 1
1
using UnityEngine ;
2
2
using UnityEngine . UI ;
3
3
using Facebook . Unity ;
4
- using FBAuthKit ;
4
+ namespace FBAuthKit . Example
5
+ {
5
6
6
- public class FacebookUIManager : MonoBehaviour {
7
+ public class FacebookUIManager : MonoBehaviour
8
+ {
7
9
8
- public GameObject facebookController , statusText ;
10
+ public GameObject facebookController , statusText ;
9
11
10
- void Start ( )
11
- {
12
- facebookController . GetComponent < FacebookAuthController > ( ) . Register ( gameObject ) ;
13
- }
12
+ void Start ( )
13
+ {
14
+ facebookController . GetComponent < FacebookAuthController > ( ) . Register ( gameObject ) ;
15
+ }
14
16
15
- void OnAuthSuccess ( AccessToken token )
16
- {
17
- statusText . GetComponent < Text > ( ) . text = token . UserId ;
18
- }
17
+ void OnAuthSuccess ( AccessToken token )
18
+ {
19
+ statusText . GetComponent < Text > ( ) . text = token . UserId ;
20
+ }
19
21
20
- void OnInitializedFailure ( )
21
- {
22
- statusText . GetComponent < Text > ( ) . text = "App Initialization Failure" ;
23
- }
22
+ void OnInitializedFailure ( )
23
+ {
24
+ statusText . GetComponent < Text > ( ) . text = "App Initialization Failure" ;
25
+ }
24
26
25
- void OnAuthRequest ( )
26
- {
27
- statusText . GetComponent < Text > ( ) . text = "Authenticating" ;
28
- }
27
+ void OnAuthRequest ( )
28
+ {
29
+ statusText . GetComponent < Text > ( ) . text = "Authenticating" ;
30
+ }
31
+
32
+ void OnAuthFailure ( )
33
+ {
34
+ statusText . GetComponent < Text > ( ) . text = "Authentication Failure" ;
35
+ }
29
36
30
- void OnAuthFailure ( )
31
- {
32
- statusText . GetComponent < Text > ( ) . text = "Authentication Failure" ;
33
37
}
34
38
35
39
}
You can’t perform that action at this time.
0 commit comments