Created
December 15, 2012 09:43
-
-
Save tylermenezes/4292396 to your computer and use it in GitHub Desktop.
Avoid the requirement that you have a Canvas app to send FB notifications by setting the window top location. Probably against the TOS. Uses CuteControllers, although the concept is easy to copy in any framework.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function __post_index() | |
| { | |
| $to = $this->request->request('to'); | |
| if ($to === NULL) { | |
| $to = '/index.html'; | |
| } | |
| $to = \CuteControllers\Router::link($to); | |
| echo '<!DOCTYPE html><head><title>Toasst</title></head><body><h1>Please wait...</h1><script type="text/javascript">top.location.href = "' . $to . '";</script></body></html>'; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment