I am trying to integrate facebook with in my asp.net mvc web application using Graph Api. I am successfully logged in to facebook and i got the cookie. but when an user clicks on logoff i want to perform a condition to go for facebook logout or my website logout like,
if(Facebook Logout)
{
return new RedirectResult("http://www.facebook.com/logout.php?api_key=XXX..");
}
else if(My Webapp logout)
{
Session.RemoveAll();
FormsAuthentication.Signout();
return RedirectToAction("Index","Home");
}
so what is the condition for whether user needs to be logout from (facebook and app) or logout from app only. How could i determine whether user connected to facebook or not.
One possible solution is Creating a session/cookie when u log-in using facebook and while log-out you can check if the cookie/Session exist and log out according