Facebook SDK for Unity

Version:0.1
Date:2013.12.19
By:Keiji Mitsbuchi
■ デジタルハリウッド大学院 ■
No.2

■ How to use Facebook SDK for Unity

How to use Facebook SDK for Unity
1.
2.
3.
4.
5.
6.

Register new Facebook app
...
No.3

■ How to use Facebook SDK for Unity

You have to ・・・
1. Download and Install Unity 4.3.2
URL : http://unity3d.com/un...
No.4

■ 1. Register new Facebook app
Create Facebook new app
https://developers.facebook.com/apps
1. [ Apps ] →
Create a N...
No.5

■ 1. Register new Facebook app
Create new Facebook app

1.App name for display
2. App unique name
[a-z] [ - ] [ _ ] ...
No.6

■ 1. Register new Facebook app
Dashboard : After vilification you will be on App Dashboard
Then take a note App ID.
...
No.7

■ 2. Create Unity new project and import SDK
Start Unity 4.3.2 create new project
No.8

■ 2. Create Unity new project and import SDK

Facebook Unity SDK
1. [Asset]
→ [Import Package]
→ [Custom Package]
2....
No.9

■ 2. Create Unity new project and import SDK
1. Import All package

1. Import Package
Project
・Example
・Facebook
・Pl...
No.10

■ 3. Setup Facebook Unity SDK
Load Sample Scene
“InteractiveConsole”

Interactive Console
Game Object

Load Sample ...
No.11

■ 3. Setup Facebook Unity SDK
Switch Platform To Web Player
1. [File] → [Build Settings …]

2. [Add Current]
* chec...
No.12

■ 3. Setup Facebook Unity SDK
Facebook Web Player Project

Interactive Console
Game Object

Web Player Mode

Facebo...
No.13

■ 3. Setup Facebook Unity SDK
Facebook SDK setting

App Name
Facebook App ID
SDK version 4.3.6

1. [Facebook] →
[Ed...
No.14

■ 3. Setup Facebook Unity SDK

Set Facebook
App ID

App ID
No.15

■ 3. Setup Facebook Unity SDK
Test Run “Interactive Console”

Run

1. Click [ FB.Init ]
2. Click [ Login ]
3. Click...
No.16

■ 4. Create and Upload Unity web app
Switch Platform To Web Player
1. [File] → [Build Settings …]

3. [New Folder]
...
No.17

■ 4. Create and Upload Unity web app

1. “triunity-a.unity3d” is Unity App binary file.
2. Upload “Unity App binary...
No.18

■ 5. Point to Unity app as Facebook app
Now change to Setting page

Facebook App ID

Select setting
No.19

■ 5. Point to Unity app as Facebook app
Add new Platform
[ Setting Page ] → [ + Add Platform ]

Add Platform
No.20

■ 5. Point to Unity app as Facebook app
1.

Select “App on Facebook”
No.21

■ 5. Point to Unity app as Facebook app
Set uploaded Unity app to Facebook App

App on Facebook
Platform added
FB a...
No.22

■ 5. Point to Unity app as Facebook app
Final Check for settings
1. Display Name
2. Name Space
3. Contact Email
4. ...
No.23

■ 6. Check with Browser & Finish
Run Facebook Unity App from Browser.
URL : https://apps.facebook.com/triunity-a
No.24

■ 6. Finish !
Login → Ask permission → Start Unity App
No.25

■ Reference

Getting Started with the Facebook SDK for Unity
https://developers.facebook.com/docs/unity/getti
ng-st...
No.26

■ memo
Upcoming SlideShare
Loading in …5
×

How to use Facebook SDK for Unity

9,122 views

Published on

How to use Facebook SDK for Unity
1. Register new Facebook app
2. Unity new project and import SDK
3. Setup Facebook Unity SDK
4. Create and Upload Unity web app
5. Point to Unity app as Facebook app
6. Check with Browser & Finish

You have to ・・・
1. Download and Install Unity 4.3.2
URL : http://unity3d.com/unity/download

2. Register for Facebook developer
URL : https://developers.facebook.com/

3. Download Facebook SDK for Unity 4.3.6
URL : https://developers.facebook.com/docs/unity/
* Facebook SDK in Asset store is old version
So I recommend download version.

4.You need a web server or cloud to upload Unity app

How to use Facebook SDK for Unity

  1. 1. Facebook SDK for Unity Version:0.1 Date:2013.12.19 By:Keiji Mitsbuchi ■ デジタルハリウッド大学院 ■
  2. 2. No.2 ■ How to use Facebook SDK for Unity How to use Facebook SDK for Unity 1. 2. 3. 4. 5. 6. Register new Facebook app Unity new project and import SDK Setup Facebook Unity SDK Create and Upload Unity web app Point to Unity app as Facebook app Check with Browser & Finish
  3. 3. No.3 ■ How to use Facebook SDK for Unity You have to ・・・ 1. Download and Install Unity 4.3.2 URL : http://unity3d.com/unity/download 2. Register for Facebook developer URL : https://developers.facebook.com/ 3. Download Facebook SDK for Unity 4.3.6 URL : https://developers.facebook.com/docs/unity/ * Facebook SDK in Asset store is old version So I recommend download version.
  4. 4. No.4 ■ 1. Register new Facebook app Create Facebook new app https://developers.facebook.com/apps 1. [ Apps ] → Create a New App Select to create new app
  5. 5. No.5 ■ 1. Register new Facebook app Create new Facebook app 1.App name for display 2. App unique name [a-z] [ - ] [ _ ] only 3. Select category 4. Create new app
  6. 6. No.6 ■ 1. Register new Facebook app Dashboard : After vilification you will be on App Dashboard Then take a note App ID. App ID use for Unity SDK Keep this code secret
  7. 7. No.7 ■ 2. Create Unity new project and import SDK Start Unity 4.3.2 create new project
  8. 8. No.8 ■ 2. Create Unity new project and import SDK Facebook Unity SDK 1. [Asset] → [Import Package] → [Custom Package] 2. Select package: FacebookSDK-131121.unitypackage 3. Open and Import all Open Package
  9. 9. No.9 ■ 2. Create Unity new project and import SDK 1. Import All package 1. Import Package Project ・Example ・Facebook ・Plugins
  10. 10. No.10 ■ 3. Setup Facebook Unity SDK Load Sample Scene “InteractiveConsole” Interactive Console Game Object Load Sample Scene InteractiveConsole
  11. 11. No.11 ■ 3. Setup Facebook Unity SDK Switch Platform To Web Player 1. [File] → [Build Settings …] 2. [Add Current] * check sample scene 3. Select Web Player 4. Switch Platform 5. Close window
  12. 12. No.12 ■ 3. Setup Facebook Unity SDK Facebook Web Player Project Interactive Console Game Object Web Player Mode Facebook Menu
  13. 13. No.13 ■ 3. Setup Facebook Unity SDK Facebook SDK setting App Name Facebook App ID SDK version 4.3.6 1. [Facebook] → [Edit Settings]
  14. 14. No.14 ■ 3. Setup Facebook Unity SDK Set Facebook App ID App ID
  15. 15. No.15 ■ 3. Setup Facebook Unity SDK Test Run “Interactive Console” Run 1. Click [ FB.Init ] 2. Click [ Login ] 3. Click [Open Friend Selector] … test your own Set up is Done
  16. 16. No.16 ■ 4. Create and Upload Unity web app Switch Platform To Web Player 1. [File] → [Build Settings …] 3. [New Folder] Type Unity app name 2. Build 4. Select Folder
  17. 17. No.17 ■ 4. Create and Upload Unity web app 1. “triunity-a.unity3d” is Unity App binary file. 2. Upload “Unity App binary file” to your rental server.
  18. 18. No.18 ■ 5. Point to Unity app as Facebook app Now change to Setting page Facebook App ID Select setting
  19. 19. No.19 ■ 5. Point to Unity app as Facebook app Add new Platform [ Setting Page ] → [ + Add Platform ] Add Platform
  20. 20. No.20 ■ 5. Point to Unity app as Facebook app 1. Select “App on Facebook”
  21. 21. No.21 ■ 5. Point to Unity app as Facebook app Set uploaded Unity app to Facebook App App on Facebook Platform added FB app URL with name space 1. Unity Integration set to “YES” 2. Your rental server URL for unity app
  22. 22. No.22 ■ 5. Point to Unity app as Facebook app Final Check for settings 1. Display Name 2. Name Space 3. Contact Email 4. Canvas Page 5. Unity Integration 6. Unity Binary URL Then Save Settings
  23. 23. No.23 ■ 6. Check with Browser & Finish Run Facebook Unity App from Browser. URL : https://apps.facebook.com/triunity-a
  24. 24. No.24 ■ 6. Finish ! Login → Ask permission → Start Unity App
  25. 25. No.25 ■ Reference Getting Started with the Facebook SDK for Unity https://developers.facebook.com/docs/unity/getti ng-started/canvas
  26. 26. No.26 ■ memo

×