-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from ARX-SKE12/authentication
Update Doc
- Loading branch information
Showing
1 changed file
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,54 @@ | ||
# facebook-auth-kit | ||
# Facebook Authentication Kit for Unity | ||
|
||
Facebook Authentication Toolkit for Unity | ||
|
||
## Usage | ||
|
||
* Add Facebook Auth Controller from `FBAuthKit/Kit/Prefabs/Facebook Auth Controller.prefab` to your Unity scene. | ||
|
||
* Create Facebook Auth subscriber script and put it to scene. | ||
|
||
## Facebook Auth Subscriber | ||
|
||
```cs | ||
using UnityEngine; | ||
using Facebook.Unity; | ||
using FBAuthKit; | ||
|
||
public class ExampleFBAuthSubscriber : MonoBehaviour { | ||
|
||
void Start() | ||
{ | ||
//Register as subscriber | ||
facebookController.GetComponent<FacebookAuthController>().Register(gameObject); | ||
} | ||
|
||
void OnAuthSuccess(AccessToken token) | ||
{ | ||
//Do something when authentication is successful. | ||
} | ||
|
||
void OnInitializedFailure() | ||
{ | ||
//Do something when Facebook SDK initialization is failure. | ||
} | ||
|
||
void OnAuthRequest() | ||
{ | ||
//Do something when waiting process of Facebook Authentication. | ||
} | ||
|
||
void OnAuthFailure() | ||
{ | ||
//Do something when authentication is failure. | ||
} | ||
|
||
} | ||
``` | ||
|
||
## Solution when Facebook.Unity.Setting.dll is duplicate! | ||
|
||
1. Close Unity | ||
2. Go to `C:\Program Files\Unity\Editor\Data\PlaybackEngines` | ||
3. Remove `Facebook` | ||
4. Open Unity Project Again |