public ActionResult Facebook()
{
var fb = new FacebookClient();
Uri loginUrl;
if (Request.Url.AbsoluteUri == "http://localhost:53624/Account/Facebook")
{
loginUrl = fb.GetLoginUrl(new
{
client_id = "210504125641177",
client_secret = "d417ef6d72b9cdb430f938eb19c1b929",
redirect_uri = RedirectUri.AbsoluteUri,
response_type = "code",
scope = "user_birthday, email"
});
}
else
{
loginUrl = fb.GetLoginUrl(new
{
client_id = "118326544910444",
client_secret = "d2f09ce5b35cd32352d295be5df2ba39",
redirect_uri = RedirectUri.AbsoluteUri,
response_type = "code",
scope = "user_birthday, email"
});
}
return Redirect(loginUrl.AbsoluteUri);
}