the facebook sdk for unity

Post on 11-Feb-2017

239 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

The Facebook SDK for Unity Michael Herring

Unity Technologies Japan

Unite Japan 2014

Cool Facebook Game

Cool Mobile Game

Unity

Facebook SDK Facebook SDK For

Unity

Why Facebook?

A Huge Audience

Over 1 billion users

375 million playing games

735 million referrals…daily!

The Facebook Canvas

Games On Facebook

Dedicated games/apps sections

Games On Facebook

Game posts are normal Facebook posts, like shares or pictures

Support For Unity Games

Unity-specific Install Pages

Support For Unity Games

Unity-specific Install Pages

Payments Integration

• Works on Facebook Canvas

• Simple API

• Facebook handles the details

Integrating Your Game Configure and Login

Perform API Requests

Post Game Activity

Configure Your Game

Configure Your Game

Delegate-Focused API

Delegate Types

public delegate void InitDelegate() public delegate void HideUnityDelegate(bool isUnityShown) public delegate void FacebookDelegate(FBResult result)

One Universal Parameter Type class FBResult : IDisposable { // exposes three relevant properties: public Texture2D Texture, public string Text, public string Error }

Login With Facebook

• Low-friction

• No need for another account

FB.Init

FB.Login

FB.Logout

Use Facebook’s Normal API Calls

• FB.API

• Convert data types where appropriate

https://developers.facebook.com/docs/graph-api

Deep Linking

Use Facebook’s Normal API Documentation

• FB.GetDeepLink

• Configure your app within Unity, and on Facebook Dev Portal

Fullscreen Dialogs

Limited Now, Expanding Fast

• Currently only for Canvas-deployed apps

• Only for “Feed” and “Request” dialogs

Facebook SDK 5.xβ

Coming Soon!

• iOS “Cold Starts”

• Better Android login

• Access graph data from within the editor!

• Smaller SDK file size

• Updated underlying SDKs

Let’s Get Started!

top related