Hey guys can I have a problem relating to Graph API, I want to get user profile info but it seems I can't generate a session, I don't know what is the problem. Here is my code.....please help me guys
session_start();
require_once "facebook/autoload.php";
use Facebook\FacebookSession;
use Facebook\FacebookRequest;
use Facebook\GraphUser;
use Facebook\FacebookRequestException;
use Facebook\FacebookRedirectLoginHelper;
$api_key = "452545828240757";
$api_secret = "30be684049158093c0de24025a4fec69";
$redirect_login_url = "http://localhost/fullsoka/index.php";
FacebookSession::setDefaultApplication($api_key,$api_secret);
$helper=new FacebookRedirectLoginHelper($redirect_login_url);
try{
$session = $helper->getSessionFromRedirect();
}
catch (Exception $ex)
{
}
if($session)
{
echo "Successfully login......";
}