File tree 1 file changed +54
-1
lines changed
1 file changed +54
-1
lines changed Original file line number Diff line number Diff line change 1
- # facebook-auth-kit
1
+ # Facebook Authentication Kit for Unity
2
+
3
+ Facebook Authentication Toolkit for Unity
4
+
5
+ ## Usage
6
+
7
+ * Add Facebook Auth Controller from ` FBAuthKit/Kit/Prefabs/Facebook Auth Controller.prefab ` to your Unity scene.
8
+
9
+ * Create Facebook Auth subscriber script and put it to scene.
10
+
11
+ ## Facebook Auth Subscriber
12
+
13
+ ``` cs
14
+ using UnityEngine ;
15
+ using Facebook .Unity ;
16
+ using FBAuthKit ;
17
+
18
+ public class ExampleFBAuthSubscriber : MonoBehaviour {
19
+
20
+ void Start ()
21
+ {
22
+ // Register as subscriber
23
+ facebookController .GetComponent <FacebookAuthController >().Register (gameObject );
24
+ }
25
+
26
+ void OnAuthSuccess (AccessToken token )
27
+ {
28
+ // Do something when authentication is successful.
29
+ }
30
+
31
+ void OnInitializedFailure ()
32
+ {
33
+ // Do something when Facebook SDK initialization is failure.
34
+ }
35
+
36
+ void OnAuthRequest ()
37
+ {
38
+ // Do something when waiting process of Facebook Authentication.
39
+ }
40
+
41
+ void OnAuthFailure ()
42
+ {
43
+ // Do something when authentication is failure.
44
+ }
45
+
46
+ }
47
+ ```
48
+
49
+ ## Solution when Facebook.Unity.Setting.dll is duplicate!
50
+
51
+ 1 . Close Unity
52
+ 2 . Go to ` C:\Program Files\Unity\Editor\Data\PlaybackEngines `
53
+ 3 . Remove ` Facebook `
54
+ 4 . Open Unity Project Again
You can’t perform that action at this time.
0 commit comments