I am creating a login page for my application in PHP. My application uses fconnect to login. Now,
If I open the web application standalone (www.acdef.com), it should show fconnect login. if it is opened inside facebook (apps.facebook.com/myapp), it should not show fconnect login and depending on which user, should show either fb permissions or the app landing page. Here is what i have done
if( (isset($_SERVER['HTTP_REFEREER']) && strpos($_SERVER['HTTP_REFEREER'], "facebook.com") !==false) || (isset($this->request->get['ref']) && strpos($this->request->get['ref'], "facebook.com") !==false))
{
// I am in canvass
}
{
// I am not in canvass
}
However, it is not working always. Many a times even while in canvass, I see fblogin button.
Whats the best solution?
-Ajay