I’ve been fighting with Facebook for the better part of a week now, and finally, I have it.
This demo shows a framework for integrating Unity3D with Facebook, with data exchange in both directions:
Please note that even though nothing visible happens, a story does get posted to your wall, so don’t click that button more than once. I tried going with dialogs, but they don’t work properly for iframe apps.
In a real app, of course, you’d not have a button, you’d post highscores or events, or whatever.
Posting title, text and image are fully configurable in the framework and can be different for each posting.
I hope Unity doesn’t mind that I use Lerps portrait for the story image.
I get the same thing, but if you check your wall, you’ll see it actually makes a post. Some kinks may have to be worked out, but it does seem this is a step in a very cool direction. Does everyone else see that error?
Tom, have you seen Tempest (Nick Breslin) topic/tutorial about Unity-Facebook integration?
Its great and helps you smooth out all the bumps there are on the road. He created an example project along with it.
The need for extended permissions is really a setback, most people wont grant you them. (And they are right, since a lot of Facebook Apps spam continue to spam their users!)
Extended permissions could improve the usability, but make them optional. The user should be able to use your application without granting Extended Permissions.
One problem is that Facebook’s dialogs won’t show on top of Unity, to solve that you can temporary hide the Unity screen.
This bit of Javascript will hide and show the Unity window:
Wow This is really awesome and exactly what Im looking for
Is there anyway you can share the example code or the project files for how you did this? or possibly a tutorial on how you did this?
I was also noticing the that the lerpz publish or skip option is under the unity player but its seems Tijmen may have solved the problem Have you tried his little bit of code?
If you want to connect with Facebook in your iPhone apps then take a look at the Unity iPhone Enhancement Pack as it now exposes the Facebook iPhone APIs.
Is there a way someone can explain this in a way a new person to this can understand and accomplish this task?
I’ve build a game, but I am unable to share it, and I’m not able to post to facebook.