Forum Sitebox Sitebox, Facebook and UnityPlayer

Discussion and help relating to the PlayerIO webpage and Facebook app hosting solution, Sitebox.

Sitebox, Facebook and UnityPlayer

Postby garysimmons » June 9th, 2011, 12:23 am

Hi Guys,

Reading the sitebox docs on the site they seem focused very much on flash and action script (including your template tags etc for embedding the flash player). Is there any API available for people who wish to embed a unity player in a facebook site using sitebox. If not, how would authentication with face book work in this instance.

Thanks
garysimmons
 
Posts: 99
Joined: May 15th, 2011, 12:02 pm

Re: Sitebox, Facebook and UnityPlayer

Postby Henrik » June 9th, 2011, 9:17 am

The pages in a Facebook app all have access to Facebook data through a javascript api, and Flash apps on Facebook can access this because the Flash plugin can communicate with the javascript of the page, i.e. you can pass variables and call methods either way.

A quick look suggests that you can do the same with the Unity web player: http://unity3d.com/support/documentatio ... ation.html

The Facebook API will be initialized and loaded for you if you use SiteBox, and here's their documentation for what you can do with it: http://developers.facebook.com/docs/ref ... pt/FB.api/


Hm, you could also perhaps pass in the access token from the SiteBox page to your unity app through SendMessage, and then call the Facebook Graph API directly, given that you can easily make https requests from your unity app, and parse JSON? Calling https://graph.facebook.com/me/friends?a ... CCESSTOKEN returns the friends of the current user, for example.

http://developers.facebook.com/docs/reference/api/
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Sitebox, Facebook and UnityPlayer

Postby garysimmons » June 9th, 2011, 9:42 am

Thanks Henrik
garysimmons
 
Posts: 99
Joined: May 15th, 2011, 12:02 pm

Re: Sitebox, Facebook and UnityPlayer

Postby Oliver » June 9th, 2011, 10:53 am

I found this post on Unity's forum that might be helpful:
http://forum.unity3d.com/threads/71846- ... -Graph-Api)-example-documentation
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Sitebox, Facebook and UnityPlayer

Postby garysimmons » June 9th, 2011, 11:13 pm

Oh that's excellent thanks Oliver. I feel a bit of idiot now for not having found that my self :)

Cheers
garysimmons
 
Posts: 99
Joined: May 15th, 2011, 12:02 pm


Return to Sitebox



cron