0

I made a unity web build of my game and uploaded it to a secure parse server. I made all the settings to integrate it with Facebook. All Facebook functions are working fine, but the changes made to the web build are visible if the web build is opened in a browser, yet the same changes are gone in a Facebook canvas page.

It seems as if Facebook is ignoring the html file and only considering the .unity3d file for playing the game on Facebook.

What might be causing this issue, and how can I resolve it?

Nikhil
  • 467
  • 10
  • 22
  • _“it seems like”_ … you have a caching problem in your browser. – CBroe Oct 29 '13 at 12:12
  • no its not a caching problem ... its not even showing default unity web player header(something like....unity web player | install now ) and footer(something like ..created with unity ). same is visible if i open up the html file but not visible on facebook canvas – Nikhil Oct 29 '13 at 12:15

1 Answers1

0

As far as I know, facebook only uses the .unity3d file and ignores the .html. The html page generated by Unity should be seen as a helper to quickly test a web build and not as a production-ready web page.

What change have you made in the html file that you'll need to reflect in the facebook page ?

  • I had changed the default unity loader to my customized image loader plus background color from white to any other plus adding links to advertise my other games on facebook ... – Nikhil Nov 05 '13 at 17:06
  • You should look at https://developers.facebook.com/docs/unity/reference/current/CUI/ to get clues on how to manipulate facebook canvas from your unity3d app. Using this example, you should be able to inject your ads and change the page background. You can't use the html generated by Unity as facebook doesn't use it. – Julien Derveeuw Nov 05 '13 at 20:08
  • i had done this julien ,but the issue is my game get clipped from bottom with same parameters by which i add an image or other html element at the top from unity app...and yes ...i am not able to change the background color of the white padding surrounding my unity app in FB page.. – Nikhil Nov 06 '13 at 05:52
  • Here is my unity snippet : string injection = "var headerElement = document.createElement('img');" + "headerElement.src = 'http://image_url/image.png';" + "var body = document.getElementsByTagName(\"body\")[0];" + "var insertionPoint = body.children[0];" + "body.insertBefore(headerElement, insertionPoint);" + "body.style.backgoundColor='#FF0000';" + "body.style.backgoundImage = url('http://image_url/bg.png');"; Application.ExternalEval(injection); – Nikhil Nov 06 '13 at 05:54