How to determine if my site is on Facebook iframe or offline site

I want to programmatically determine if my site is in the iFrame Facebook application, so I can display certain functions specifically for Facebook. Otherwise, if someone goes to the site without Facebook. Preferably a FBML, C # or JS solution would be great :) thanks!

+5
source share
1 answer

Well, you can always go with basic javascript validation, regardless of whether the page is styled

if ( top === window )
{
  // page is not framed
}

, -, Facebook URL- , GET, ( ), .

+6

All Articles