'198501313539646', 'secret' => '20f278ac7e92eee855f263efadd98035', 'cookie' => true, )); $session = $facebook->getSession(); $me = null; if ($session) { try { $uid = $facebook->getUser(); $me = $facebook->api('/me'); } catch (FacebookApiException $e) { error_log($e); } } if($me){ $logoutUrl = $facebook->getLogoutUrl(); }else{ $loginUrl = $facebook->getLoginUrl( array( 'canvas' => 1 , 'fbconnect' => 0 , 'req_perms' => 'read_stream,publish_stream,offline_access' , 'display' => 'page' )); echo ""; exit; } print("Szia, ".iconv('utf-8','ISO-8859-2',$me['first_name'])."!"); ?>