/** * Get the parent identifier * * @return string */ public function getParent() { if (!$this->container) { return null; } return $this->container->getSlug(); }
/** * Determine the current provider that match the current request. * * @return FacebookRedirectLoginHelper */ protected function determineCurrentProvider() { $providers = $this->container->get($this->container->getSlug() . '.providers'); foreach ($providers as $provider) { if ($provider instanceof FacebookSignedRequestFromInputHelper) { /* if ($origin == 'https://apps.facebook.com' && $provider instanceof FacebookCanvasLoginHelper) { } if ($origin == 'https://apps.facebook.com' && $provider instanceof FacebookCanvasLoginHelper) { } */ //choose between canvas and page tab. //if this provider is a pagetab helper, without page data, pass it to the canvas. if ($provider instanceof FacebookPageTabHelper && !$provider->getPageId()) { continue; } $rs = $provider->getRawSignedRequest(); if ($rs) { return $provider; } } //this provider should always be default as last in the array if ($provider instanceof FacebookRedirectLoginHelper) { return $provider; } } }