public ActionResult Addfacebookpagebyurl(string type, string url, string name) { var pageid = ""; string strdata = string.Empty; if (type == "fanpage") { try { logger.Error("Enter in try Addfacebookpagebyurl"); try { Api.Facebook.Facebook apiobjFacebook = new Api.Facebook.Facebook(); logger.Error("Enter in try Addfacebookpagebyurl 1"); dynamic data = string.Empty; try { Domain.Socioboard.Domain.AddFacebookPage objAddFacebookPage = (Domain.Socioboard.Domain.AddFacebookPage)(new JavaScriptSerializer().Deserialize(apiobjFacebook.GetFbPageDetails(url), typeof(Domain.Socioboard.Domain.AddFacebookPage))); pageid = objAddFacebookPage.ProfilePageId; name = objAddFacebookPage.Name; if (!string.IsNullOrEmpty(pageid)) { try { Domain.Socioboard.Domain.User objUser = (Domain.Socioboard.Domain.User)Session["User"]; apiobjFacebook.AddFacebookPagesByUrl(objUser.Id.ToString(), pageid, Session["group"].ToString(), name); strdata = "success"; } catch (Exception ex) { logger.Error(ex.StackTrace); } } else { strdata = "invalid"; } } catch (Exception ex) { strdata = "invalid"; logger.Error(ex.StackTrace); } } catch (Exception ex) { logger.Error(ex.StackTrace); } } catch (Exception ex) { logger.Error(ex.StackTrace); } } else { } return(Content(strdata)); }
public ActionResult Addfacebookpagebyurl(string type, string url, string name) { var pageid = ""; if (type == "fanpage") { try { logger.Error("Enter in try Addfacebookpagebyurl"); try { Api.Facebook.Facebook apiobjFacebook = new Api.Facebook.Facebook(); logger.Error("Enter in try Addfacebookpagebyurl 1"); dynamic data = string.Empty; string strdata = string.Empty; try { Domain.Socioboard.Domain.AddFacebookPage objAddFacebookPage = (Domain.Socioboard.Domain.AddFacebookPage)(new JavaScriptSerializer().Deserialize(apiobjFacebook.GetFbPageDetails(url), typeof(Domain.Socioboard.Domain.AddFacebookPage))); pageid = objAddFacebookPage.ProfilePageId; } catch (Exception ex) { logger.Error(strdata); logger.Error(data); logger.Error(ex.Message); logger.Error(ex.StackTrace); } { logger.Error("data = fb.Get"); logger.Error(pageid); string Accestoken = string.Empty; string mail = string.Empty; if (pageid != null) { try { logger.Error("Inside apiobjFacebook.AddFacebookPagesByUrl"); Domain.Socioboard.Domain.User objUser = (Domain.Socioboard.Domain.User)Session["User"]; apiobjFacebook.AddFacebookPagesByUrl(objUser.Id.ToString(), pageid, Session["group"].ToString(), name); } catch (Exception ex) { Console.WriteLine(ex.StackTrace); logger.Error("error1"); logger.Error(ex.Message); logger.Error(ex.StackTrace); } } else { } } } catch (Exception ex) { Console.WriteLine(ex.StackTrace); logger.Error("dynamic data"); logger.Error(ex.Message); logger.Error(ex.StackTrace); } } catch (Exception ex) { Console.WriteLine(ex.StackTrace); logger.Error(ex.Message); logger.Error(ex.StackTrace); } } else { } return Content(""); }
public ActionResult Addfacebookpagebyurl(string type, string url, string name) { var pageid = ""; if (type == "fanpage") { try { logger.Error("Enter in try Addfacebookpagebyurl"); try { Api.Facebook.Facebook apiobjFacebook = new Api.Facebook.Facebook(); logger.Error("Enter in try Addfacebookpagebyurl 1"); dynamic data = string.Empty; string strdata = string.Empty; try { Domain.Myfashion.Domain.AddFacebookPage objAddFacebookPage = (Domain.Myfashion.Domain.AddFacebookPage)(new JavaScriptSerializer().Deserialize(apiobjFacebook.GetFbPageDetails(url), typeof(Domain.Myfashion.Domain.AddFacebookPage))); pageid = objAddFacebookPage.ProfilePageId; } catch (Exception ex) { logger.Error(strdata); logger.Error(data); logger.Error(ex.Message); logger.Error(ex.StackTrace); } { logger.Error("data = fb.Get"); logger.Error(pageid); string Accestoken = string.Empty; string mail = string.Empty; if (pageid != null) { try { logger.Error("Inside apiobjFacebook.AddFacebookPagesByUrl"); Domain.Myfashion.Domain.User objUser = (Domain.Myfashion.Domain.User)Session["User"]; apiobjFacebook.AddFacebookPagesByUrl(objUser.Id.ToString(), pageid, Session["group"].ToString(), name); } catch (Exception ex) { Console.WriteLine(ex.StackTrace); logger.Error("error1"); logger.Error(ex.Message); logger.Error(ex.StackTrace); } } else { } } } catch (Exception ex) { Console.WriteLine(ex.StackTrace); logger.Error("dynamic data"); logger.Error(ex.Message); logger.Error(ex.StackTrace); } } catch (Exception ex) { Console.WriteLine(ex.StackTrace); logger.Error(ex.Message); logger.Error(ex.StackTrace); } } else { } return(Content("")); }
public ActionResult Addfacebookpagebyurl(string type, string url, string name) { var pageid = ""; string strdata = string.Empty; if (type == "fanpage") { try { logger.Error("Enter in try Addfacebookpagebyurl"); try { Api.Facebook.Facebook apiobjFacebook = new Api.Facebook.Facebook(); logger.Error("Enter in try Addfacebookpagebyurl 1"); dynamic data = string.Empty; try { Domain.Socioboard.Domain.AddFacebookPage objAddFacebookPage = (Domain.Socioboard.Domain.AddFacebookPage)(new JavaScriptSerializer().Deserialize(apiobjFacebook.GetFbPageDetails(url), typeof(Domain.Socioboard.Domain.AddFacebookPage))); pageid = objAddFacebookPage.ProfilePageId; name = objAddFacebookPage.Name; if (!string.IsNullOrEmpty(pageid)) { try { Domain.Socioboard.Domain.User objUser = (Domain.Socioboard.Domain.User)Session["User"]; apiobjFacebook.AddFacebookPagesByUrl(objUser.Id.ToString(), pageid, Session["group"].ToString(), name); strdata = "success"; } catch (Exception ex) { logger.Error(ex.StackTrace); } } else { strdata = "invalid"; } } catch (Exception ex) { strdata = "invalid"; logger.Error(ex.StackTrace); } } catch (Exception ex) { logger.Error(ex.StackTrace); } } catch (Exception ex) { logger.Error(ex.StackTrace); } } else { } return Content(strdata); }