} if(USE_FB_DIALOG_JS){ echo "<script>var USE_FB_DIALOG_JS=true;</script>"; } if(SEND_MSG_VIA_JS || isset($_GET['request_ids'])){ echo "<script>var SEND_MSG_VIA_JS = true; var FB_ID='".FB_ID."'; var kt_message_queue = [];</script>"; if($uid){ echo "<script>var SESSION = ".json_encode($session).";</script>"; } } if(KT_AUTO_PAGEVIEW_TRACKING){ if($uid) echo "<img src='".$kt->gen_tracking_pageview_link($uid)."' width='0px' height='0px' style='display:none;'/>"; } if($uid){ if(!SEND_MSG_VIA_JS){ // // Track Install // /**** * Facebook has gotten rid of post-authorized url for all new apps. FB did grandfathered * old apps to keep their existing post-authroized url. * $browser_install_cookie_key = $kt->gen_kt_handled_installed_cookie_key(FB_ID, $uid); if( !isset($_COOKIE[$browser_install_cookie_key]) ){ $fb_cookie_arry = $facebook->api(array('method' => 'data.getcookies',