<?php use Application\H; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html><head> <?php echo H::og($openGraphTags); ?> <meta property="fb:app_id" content="<?php echo H::vars()->fb->appId; ?> " /> <meta property="og:url" content="<?php echo H::vars()->fb->canvasUrl; ?> " /> <meta property="og:type" content="website" /> <meta property="og:title" content="Tide+ ValenTide: Give a free bottle of Tide+ to someone special." /> <meta property="og:description" content="Give that special someone more of what they love: the gift of clean. Just guess your friend's favorite Tide+, and if they match it, they could get a free 10 oz bottle, while supplies last." /> <meta property="og:image" content="<?php echo H::u('img/ValenTide_Post_1200x627_itsBack.jpg'); ?> "> <script> top.location.href = '<?php echo $redirectUrl; ?> '; </script> </head></html>
/** * */ public static function getRedirectUrl() { if (!static::isTab() && !Device::device()->isMobile) { $page = App::$inst->appPageUrl; $appData = H::appData(); if (!empty($appData)) { $page .= "&app_data=" . $appData; } return $page; } elseif (Device::device()->isMobile) { $appData = H::appData(); $page = ''; if (!empty($appData)) { $page .= "?app_data=" . $appData; } return H::u('index/tab/' . $page); } return false; }
private static function initAppVars() { App::$inst->container->singleton('vars', function () { $config = App::$inst->config; $fb = $config['facebook']; $sr = App::$inst->fb->getSignedRequest(); $cfg = new \ArrayObject(array('fb' => new \ArrayObject(array('appId' => $fb['appId'], 'appNamespace' => $fb['namespace'], 'tabUrl' => App::$inst->appPageUrl, 'canvasUrl' => H::cu(), 'channelUrl' => H::u('channel.php') . '/?locale=' . App::$inst->locale, 'pageUrl' => App::$inst->pageUrl, 'pageId' => $fb['pageId'], 'currentPageId' => App::$inst->currentPageId ?: 0, 'permissions' => isset($fb['permissions']) ? $fb['permissions'] : '', 'userId' => App::$inst->fb->getSignedRequest() ?: 0, 'isFan' => (bool) @$sr['page']['liked'], 'isAdmin' => (bool) @$sr->sr['page']['admin'], 'appData' => H::appData(), 'locale' => App::$inst->locale, 'debug' => isset(App::$inst->config['debugBar']) ? (int) App::$inst->config['debugBar'] : ''), \ArrayObject::ARRAY_AS_PROPS), 'ig' => new \ArrayObject(array('appId' => isset($config['instagram']['appId']) ? $config['instagram']['appId'] : null, 'channelUrl' => H::u('igChannel.html'), 'permissions' => isset($config['instagram']['permissions']) ? $config['instagram']['permissions'] : null), \ArrayObject::ARRAY_AS_PROPS), 'app' => new \ArrayObject(array('url' => H::u(App::$inst->request->getResourceUri()), 'version' => H::version() ?: 1, 'phase' => App::$inst->phase ?: 1, 'environment' => APPLICATION_ENV, 'isMobile' => Device::device()->isMobile, 'gaAccount' => @$config['metrics']['options']['code'], 'gaNamespace' => '', 'videoUrl' => H::videoURL()), \ArrayObject::ARRAY_AS_PROPS)), \ArrayObject::ARRAY_AS_PROPS); return $cfg; }); }