Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by xjimdim · Nov 09, 2015 at 06:14 PM · canvaswebglfacebook

Facebook Canvas and WebGL problem

I have a problem with facebook canvas and web gl...

If i go directly to the address of the game hosted in my google drive herE: https://b1754d066320e56286ea139f5db4fa41b2d2c00d.googledrive.com/host/0B6aEHRQAY6txfmVSMkM1M2NST0QtT3Y2cjZEZVA3Q2dEeFFPS05qUG9MeUw1ZUFxLUR4LVU/

everything plays fine (the game is around 300mb), if i post the link from my game to facebook canvas and hit publish and then go to the facebook address of my game , i just see a white screen...

Is there a size limit for facebook canvas?? and if so is there a way to decrease the size of the game in webgl?? if i just exprot for web its just 40mb (and it makes sense because the game is not that big)

any help would be much appreciated

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by zzzzzz789 · Nov 09, 2015 at 09:23 PM

There is no size limit for Facebook Canvas, the issue your are experiencing is due to the configuration of the web hosting you are using for your game.

Facebook uses POST to request data to fill the Canvas iframe. Google Drive hosting adds 'X-Frame-Options' to 'SAMEORIGIN' when issued a HTTP POST. This is why you get the error below in the console when trying to use Google Drive for hosting on Facebook.com.

SAMEORIGIN issues

To solve this, try using another hosting solution. One place to get started is Heroku, which offers free hosting and supports HTTP POST requests.


hostingerror.png (45.4 kB)
Comment
Add comment · Show 6 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image xjimdim · Nov 10, 2015 at 11:32 AM 0
Share

thanks!! i will try it out :)

avatar image xjimdim · Nov 15, 2015 at 02:41 PM 0
Share

Hello again!! is there any guide on how to upload and host my web gl app on heroku??? because the link you gave me doesn't help much... should i first upload it to github?

avatar image zzzzzz789 xjimdim · Nov 16, 2015 at 05:19 AM 0
Share

Start on the heroku dash, create application, create app, follow directions for the Heroku Toolbelt to setup your project. The easiest quick way for heroku to recognize your application as a php app for hosting is to just rename index.html to index.php, then run the git push heroku master to deploy!

You could also create a hacky alias to have this automated like so: alias gphm_unity='pushd PATH/TO/BUILD;mv -f index.html index.php;git init;git add --all;git commit -m "deploy";git push git@heroku.com:YOURAPPNA$$anonymous$$$$anonymous$$git -f master;rm -fr .git;popd'

avatar image xjimdim zzzzzz789 · Nov 16, 2015 at 12:46 PM 0
Share

I followed these instructions https://discussion.heroku.com/t/push-rejected-no-cedar-supported-app-detected/640 and i finally got to upload it

However when i go to the address of my app here http://shadowhunters.herokuapp.com I get instant loading and no game!! How can I see inside my repository to check if all the files were uploaded?

avatar image xjimdim · Nov 28, 2015 at 03:03 AM 0
Share

Ok so after a lot of searching and testing a few sites I ended up with amazon's aws. So i managed to host my game with https at shadowhunters.s3.amazonaws.com/index.html It runs perfect just like google drive. However, when I put it on facebook I get the following error:

PreconditionFailedAt least one of the pre-conditions you specified did not holdBucket POST must be of the enclosure-type multipart/form-data09E91DA867B8093BBnyza7TdztBAJhoNk9m2I9ZjL9D3dtPetoqJ8/3zGR93I‌​zr28oq+CX34avwRFfRdrl2w0uqayQ8=

avatar image zzzzzz789 xjimdim · Nov 28, 2015 at 05:21 AM 0
Share

Hi @xjimdim, unfortunately S3 hosting has similar issues to google drive, they do not fully support content loading via HTTP POST as Facebook requires for Canvas applications. see: http://blog.svnlabs.com/amazon-s3-facebook-fanpage-app/

If you move to using an EC2 instance on AWS you will have to obtain a SSL certificate for your domain. I encourage you return and try heroku to begin with simple hosting.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

39 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Didn't loading facebook instant game 0 Answers

WebGL. UI raycast targets don't get rotated when rotating html-container with css. 0 Answers

web gl facebook multiplayer 0 Answers

WebGL Facebook SDK Login 0 Answers

Facebook SDK does not return focus to game canvas after FB purchase popup closed 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges