1

I've web player build n I want to upload /integrate it with Facebook how it can be possible? Any guide or tutorial will be very helpful to me, I'd tried following :

http://forum.unity3d.com/threads/150831-Unity-webplayer-into-Facebook-with-Dropbox

http://forum.unity3d.com/threads/7812-Unity3D-meet-Facebook!/page4

Canvas URL / Secure Canvas URL error message

though nothing is working for me.. :( Its asking me to install unity web player even though I already have it installed.

Any guide or tutorial will be very helpful to me. Any Help would be Greatly Appreciated..!

Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
Harschell
  • 96
  • 1
  • 2
  • 9
  • 1
    Are you asking how to embed a Unity game inside of facebook or using FaceBook inside of your game? – CC Inc Dec 24 '12 at 20:06
  • I'm asking how to embed a Unity game inside of Facebook... & If you can give info about how to use Facebook inside my unity game W'll be greatly helpful... Any tutorials/examples on above mentioned both the points 'll be extremely helpful... though Suggestions are also welcome – Harschell Dec 27 '12 at 07:35

1 Answers1

10

Facebook-Unity integration:

There is a wonderful tutorial located HERE that outlines how you integrate Facebook into Unity3d, so for example if you would like to retrieve a persons friends, posts, etc and use that data inside of Unity. In this specific example, they do this via using a JavaScript webpage and linking to it externally from Unity.

THIS approach is more for a WebPlayer type distribution.

This is the introduction of that tutorial:

A note before you start: This is a Unity tutorial about implementing Facebook in Unity projects. It’s a technical how-to guide for Unity developers who want to use Facebook Connect in their web-apps. I In this 3-part series we’ll learn how to connect our Unity application with Facebook, show highscores of our friends and how to secure our application.

There is, however, another way of accessing FaceBook within Unity, and that is by using JSON within Unity. For an example on that, see THIS tutorial.

THIS approach is more likely to be used in a Desktop type distribution.

There are a lot of ways to access Facebook if you are building a game for the web player but it’s difficult if your game is desktop based as you have to somehow get the user to login to Facebook and authorize your application, this is difficult in Unity as it’s WWW class doesn’t have enough control over it nor does the launch application. I couldn’t find a solution that existed so I’ve come up with something that works perfectly, probably not-as elegant but it is a good trade-off.

As for your question on creating a Facebook app WITH Unity, there are a couple of ways.

Flash Player Facebook Integration:

The the first route, if you are able to, purchase the $400 Adobe Flash plugin for Unity at the store here. While this is expensive, it most certainly would be easier to distribute to Facebook in the future, as Facebook prefers apps to be in Adobe Flash. You can convert your existing webplayer app to flash then upload to Facebook.

Web Basic Integration:

This is basically just embedding your hosted Unity3D web player into a Facebook canvas. This type of integration is the most simple of all because is basically just embedding your Unity3D web player into a Facebook page so people can play it right there. For this you will need to have your Unity3D web player already hosted and running somewhere with public access. The steps are super simple:

  1. Go to Facebook Developers
  2. Setup a new application
  3. Fill the Canvas Page text field with your desired app name
  4. Fill the Canvas URL text field with the URL of your unity web player

Once you do that, you are done and you app will be already running in Facebook.

If this helps, please uprate and accept! If you have any questions, I will be glad to help!

CC Inc
  • 5,842
  • 3
  • 33
  • 64