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\$

1 Answer 1

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\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .