4
\$\begingroup\$

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?

\$\endgroup\$
2
\$\begingroup\$

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();
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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