Unity iPhone and Facebook connectivity

Hi All,

I am developing a multi-player game in Unity iPhone. I want to connect my application to the Facebook. Also I want to do the data transfer using Facebook. Currently I have no idea about Facebook connectivity in Unity iPhone. Please any one guide me regarding this.

Thanks In Advance.

Unity iPhone does not offer any facebook connectivity

but there are at least a handfull of threads on the topic that should get you going

May be use “Unity iPhone enhancement pack”… :lol:

Facebook connectivity on the web is driven by content (Unity games for example) communicating with JavaScript contained in the web page, that JavaScript is what then sends/receives data from Facebook (using the current browser’s login session to determine who you are). Given that on the iPhone you’re building stand-alone applications that’s no longer present and thus the connectivity isn’t there.

Minevr jokes, but perhaps there’s some way to go about that. I don’t know of one, but there may be some non-JavaScript API set available as even Facebook made an iPhone app, do they expose those hooks at all? I don’t know, I’m doubtful in fact, but they might so it may be worth a look.

It’s no joke, Tom! There’s a Facebook Connect SDK for iPhone developers that you can download: http://wiki.developers.facebook.com/index.php/Facebook_Connect_for_iPhone

The upcoming Enhancement Pack 1.5 uses it to provide these functions:

void SB_facebookStart( string apiKey_str, string myAppSecret_str );
void SB_facebookGetPermission( string perm_str );
void SB_facebookSetStatus (string status_str);
void SB_facebookPublishFeed( string prompt_str, string feed_str, string action_str);
void SB_facebookLogout();

I’ve used it to make wall postings (complete with a screenshot, text and a buy-now action link). I haven’t written any docs for these functions yet, but if you’re familiar with the Facebook API in general it’s pretty straightforward.

And Dreamora’s right, there’s various past threads that show ways to use the FaceBook API from Unity. Like this one: http://forum.unity3d.com/viewtopic.php?t=20469

Dang Rob, you rock!

Thanks for yet another awesome tweak to the iPhone Enhancement Kit!

And to you and Dreamora for shedding light in my apparently dark(ish) world. :slight_smile:

Dear bliprob:

I’d like to use Facebook feature of your “Unity iPhone Enhancement pack”, but I have some questions for this pack, would you please be so kind to answer me?

Thank you. :wink:

Q:

  1. How can I get the pack? I see the “BUY” link on your web site, but what would happen when I paid money? It will redirect me to download code? Or I have to wait your personal reply and tell me where to download? (I am sorry we are hurry to use that feature.)

  2. If I only want to use Facebook feature, is it possible to buy this part only?

Sincerely,

I wonder when would Unity-iPhone add on Facebook support feature?

I have written a free plugin for Unity Basic for Facebook Connect

http://forum.unity3d.com/viewtopic.php?t=41051&sid=b7a5a1ac48ee6a4ac1938c5faaa809b8

It works fine, and if you are willing to take a look at the code, is quite customizable. If you want “out of the box” you should buy the enhancement pack.

I will be fooling around with OpenFeint soon as well…