Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 21st, 2012  |  syntax: None  |  size: 0.52 KB  |  hits: 47  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. facebook redirect app from canvas page to fan page
  2. top.location.href='http://www.facebook.com/YOUR_PAGE_NAME?sk=app_YOUR_APP_ID'
  3.        
  4. <script type="text/javascript">
  5.   function NotInFacebookFrame() {
  6.     return top === self;
  7.   }
  8.   function ReferrerIsFacebookApp() {
  9.     if(document.referrer) {
  10.       return document.referrer.indexOf("apps.facebook.com") != -1;
  11.     }
  12.     return false;
  13.   }
  14.   if (NotInFacebookFrame() || ReferrerIsFacebookApp()) {
  15.     top.location.replace("http://permalink-to-my-facebook-page-tab");
  16.   }
  17. </script>