Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Is there any way to allow the user to click a button on a Facebook canvas app and allow the app to go full-screen?

If it's possible, is it permitted by Facebook?

share|improve this question

1 Answer 1

Sure!

The web has a "request fullscreen" API that you can use (be sure to read up on in the reference section below). Facebook seems to indicate this is allowed to be use, just take a look at this transcript:

Now that Facebook is crippling Facebook Connect powered games as of December 5, 2012 it is imperative that the allowFullScreen attribute is added to Canvas apps' iframes so that we can utilize HTML5's fullscreen mode in our games.

Then, some time later...

This should now be resolved. Thanks for your patience.

Requesting Fullscreen

Simply retrieve your canvas element and call requestFullScreen:

(document.getElementById('canvas')).requestFullscreen();
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.