JS + unity problems in FB

Hi all,

I’m trying to do Facebook for Web player. I’m following the Tutorial provided by paladin studios for FB connect to Webplayer. I Followed the steps what they’re provided in their blog. here is the link http://www.paladinstudios.com/2011/11/15/facebook-and-unity-tutorial-part-one/

Am getting this error in GetUnity() Function while run into my browser.

Uncaught TypeError: Object # has no method ‘embedUnity’

I dont know exactly how to resolve this error, I hope some one tried to work on FB for web player unity.

here is get unity method,

function getUnity() //Default unity functions
{
    if (typeof unityObject != "undefined")
    {
        return unityObject.getObjectById("unityPlayer");
    }
}
if (typeof unityObject != "undefined")
{
    unityObject.embedUnity("unityPlayer", "Social.unity3d", 960, 640);
}

Thanks.

embedUnity() is a function in UnityObject.js. It’s not available in UnityObject2.js. I think UnityObject.js still ships with Unity 4.x, so perhaps look at the documentation for 3.x, and change your code to use UnityObject.js. (UO2.js is the 4.x replacement for UO.js.)