public ActionResult wallposts(string op, string load, string profileid) { Dictionary <string, List <object> > dictwallposts = new Dictionary <string, List <object> >(); if (load == "first") { Session["FacebookProfileIdForFeeds"] = profileid; facebookwallcount = 0; } else { profileid = (string)Session["FacebookProfileIdForFeeds"]; facebookwallcount = facebookwallcount + 10; } Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups(); Domain.Socioboard.Domain.Groups objGroups = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups))); Api.FacebookMessage.FacebookMessage ApiobjFacebookMessage = new Api.FacebookMessage.FacebookMessage(); List <Domain.Socioboard.Domain.FacebookMessage> lstFacebookMessage = (List <Domain.Socioboard.Domain.FacebookMessage>)(new JavaScriptSerializer().Deserialize(ApiobjFacebookMessage.GetAllWallpostsOfProfileAccordingtoGroup(profileid, facebookwallcount, objGroups.UserId.ToString()), typeof(List <Domain.Socioboard.Domain.FacebookMessage>))); List <object> lstobject = new List <object>(); foreach (var item in lstFacebookMessage) { lstobject.Add(item); } dictwallposts.Add("facebook", lstobject); return(PartialView("_Panel1Partial", dictwallposts)); }
public ActionResult wallposts(string op, string load, string profileid) { Dictionary<string, List<object>> dictwallposts = new Dictionary<string, List<object>>(); if (load == "first") { Session["FacebookProfileIdForFeeds"] = profileid; facebookwallcount = 0; } else { profileid = (string)Session["FacebookProfileIdForFeeds"]; facebookwallcount = facebookwallcount + 10; } Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups(); Domain.Socioboard.Domain.Groups objGroups = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups))); Api.FacebookMessage.FacebookMessage ApiobjFacebookMessage = new Api.FacebookMessage.FacebookMessage(); List<Domain.Socioboard.Domain.FacebookMessage> lstFacebookMessage = (List<Domain.Socioboard.Domain.FacebookMessage>)(new JavaScriptSerializer().Deserialize(ApiobjFacebookMessage.GetAllWallpostsOfProfileAccordingtoGroup(profileid, facebookwallcount, objGroups.UserId.ToString()), typeof(List<Domain.Socioboard.Domain.FacebookMessage>))); List<object> lstobject = new List<object>(); foreach (var item in lstFacebookMessage) { lstobject.Add(item); } dictwallposts.Add("facebook", lstobject); return PartialView("_Panel1Partial", dictwallposts); }
public async Task <ActionResult> BindFacebookFeed(string load, string arrid) { string FacebooProfiles = string.Empty; Domain.Socioboard.Domain.User objUser = (Domain.Socioboard.Domain.User)Session["User"]; if (load == "first") { //Dictionary<Domain.Socioboard.Domain.TeamMemberProfile, object> allprofileofuser = await SBUtils.GetUserProfilesccordingToGroup(); Dictionary <Domain.Socioboard.Domain.GroupProfile, object> allprofileofuser = await SBHelper.GetGroupProfiles(); foreach (var item in allprofileofuser) { try { if (item.Key.ProfileType == "facebook") { FacebooProfiles += item.Key.ProfileId + ','; } } catch (Exception Err) { Console.Write(Err.StackTrace); } } try { FacebooProfiles = FacebooProfiles.Substring(0, (FacebooProfiles.Length - 1)); } catch (Exception ex) { Console.WriteLine(ex.StackTrace); } facebookFeedCount = 0; } else if (load == "filter") { facebookFeedCount = 0; FacebooProfiles = arrid; } else if (load == "scroll") { facebookFeedCount = facebookFeedCount + 10; FacebooProfiles = arrid; } //Api.InboxMessages.InboxMessages ApiInboxMessages = new Api.InboxMessages.InboxMessages(); Api.FacebookMessage.FacebookMessage ApiFacebookMessage = new Api.FacebookMessage.FacebookMessage(); List <Domain.Socioboard.MongoDomain.FacebookMessage> _FacebookMessage = (List <Domain.Socioboard.MongoDomain.FacebookMessage>) new JavaScriptSerializer().Deserialize(ApiFacebookMessage.GetFacebookMessageWithSentiments(FacebooProfiles, facebookFeedCount.ToString(), "10"), typeof(List <Domain.Socioboard.MongoDomain.FacebookMessage>)); if (_FacebookMessage.Count > 0) { return(PartialView("_FacebookFeedPartial", _FacebookMessage)); } else { return(Content("no_data")); } }
public ActionResult FacebookTag(string ProfileId) { List <object> lstobject = new List <object>(); Dictionary <string, List <object> > dictTag = new Dictionary <string, List <object> >(); Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups(); Domain.Socioboard.Domain.Groups objGroups = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups))); Api.FacebookMessage.FacebookMessage ApiobjFacebookMessage = new Api.FacebookMessage.FacebookMessage(); List <FacebookMessage> lstFacebookTag = (List <FacebookMessage>)(new JavaScriptSerializer().Deserialize(ApiobjFacebookMessage.getAllFacebookTagOfUsers(objGroups.UserId.ToString(), ProfileId), typeof(List <FacebookMessage>))); foreach (var FacebookTag in lstFacebookTag) { lstobject.Add(FacebookTag); } dictTag.Add("facebook", lstobject); return(PartialView("_Panel3Partial", dictTag)); }
public ActionResult ShowMsgMailPopUp(string MsgId, string Network) { Domain.Socioboard.Domain.User objUser = (Domain.Socioboard.Domain.User)Session["User"]; Dictionary <string, object> twtinfo = new Dictionary <string, object>(); Api.TwitterMessage.TwitterMessage ApiobjTwitterMessage = new Api.TwitterMessage.TwitterMessage(); Api.FacebookMessage.FacebookMessage ApiobjFacebookMessage = new Api.FacebookMessage.FacebookMessage(); if (Network == "twitter") { Domain.Socioboard.Domain.TwitterMessage twtmessage = (Domain.Socioboard.Domain.TwitterMessage)(new JavaScriptSerializer().Deserialize(ApiobjTwitterMessage.GetTwitterMessageByMessageId(objUser.Id.ToString(), MsgId), typeof(Domain.Socioboard.Domain.TwitterMessage))); twtinfo.Add("twt_msg", twtmessage); } else if (Network == "facebook") { Domain.Socioboard.Domain.FacebookMessage fbmessage = (Domain.Socioboard.Domain.FacebookMessage)(new JavaScriptSerializer().Deserialize(ApiobjFacebookMessage.GetFacebookMessageByMessageId(objUser.Id.ToString(), MsgId), typeof(Domain.Socioboard.Domain.FacebookMessage))); twtinfo.Add("fb_msg", fbmessage); } return(PartialView("_MailMsgSendingPartial", twtinfo)); //return PartialView("_TwitterMailSendingPartial", twtfeed); }
public ActionResult ShowMsgMailPopUp(string MsgId, string Network) { Domain.Socioboard.Domain.User objUser = (Domain.Socioboard.Domain.User)Session["User"]; Dictionary<string, object> twtinfo = new Dictionary<string, object>(); Api.TwitterMessage.TwitterMessage ApiobjTwitterMessage = new Api.TwitterMessage.TwitterMessage(); Api.FacebookMessage.FacebookMessage ApiobjFacebookMessage = new Api.FacebookMessage.FacebookMessage(); if (Network == "twitter") { Domain.Socioboard.Domain.TwitterMessage twtmessage = (Domain.Socioboard.Domain.TwitterMessage)(new JavaScriptSerializer().Deserialize(ApiobjTwitterMessage.GetTwitterMessageByMessageId(objUser.Id.ToString(), MsgId), typeof(Domain.Socioboard.Domain.TwitterMessage))); twtinfo.Add("twt_msg", twtmessage); } else if (Network == "facebook") { Domain.Socioboard.Domain.FacebookMessage fbmessage = (Domain.Socioboard.Domain.FacebookMessage)(new JavaScriptSerializer().Deserialize(ApiobjFacebookMessage.GetFacebookMessageByMessageId(objUser.Id.ToString(), MsgId), typeof(Domain.Socioboard.Domain.FacebookMessage))); twtinfo.Add("fb_msg", fbmessage); } return PartialView("_MailMsgSendingPartial", twtinfo); //return PartialView("_TwitterMailSendingPartial", twtfeed); }
//[OutputCache(Duration = 45, Location = OutputCacheLocation.Client, NoStore = true)] public ActionResult wallposts_FeedsSearch(string op, string load, string profileid, string keyword) { string datetime = Helper.Extensions.ToClientTime(DateTime.UtcNow); //string datetime = Request.Form["localtime"].ToString(); ViewBag.datetime = datetime; Dictionary<string, List<object>> dictwallposts = new Dictionary<string, List<object>>(); if (load == "first") { Session["FacebookProfileIdForFeeds"] = profileid; facebookwallcount = 0; } else { profileid = (string)Session["FacebookProfileIdForFeeds"]; facebookwallcount = facebookwallcount + 10; } Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups(); Domain.Socioboard.Domain.Groups objGroups = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups))); Api.FacebookMessage.FacebookMessage ApiobjFacebookMessage = new Api.FacebookMessage.FacebookMessage(); List<Domain.Socioboard.MongoDomain.FacebookMessage> lstFacebookMessage = new List<Domain.Socioboard.MongoDomain.FacebookMessage>(); lstFacebookMessage = (List<Domain.Socioboard.MongoDomain.FacebookMessage>)(new JavaScriptSerializer().Deserialize(ApiobjFacebookMessage.GetAllWallpostsOfProfileAccordingtoGroupByUserIdAndProfileId1WithRange(objGroups.UserId.ToString(), keyword, profileid, facebookwallcount.ToString()), typeof(List<Domain.Socioboard.MongoDomain.FacebookMessage>))); if (lstFacebookMessage == null) { lstFacebookMessage = new List<Domain.Socioboard.MongoDomain.FacebookMessage>(); } List<object> lstobject = new List<object>(); foreach (var item in lstFacebookMessage) { lstobject.Add(item); } dictwallposts.Add("facebook", lstobject); return PartialView("_Panel1Partial", dictwallposts); }
public ActionResult FacebookTag(string ProfileId) { List<object> lstobject = new List<object>(); Dictionary<string, List<object>> dictTag = new Dictionary<string, List<object>>(); Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups(); Domain.Socioboard.Domain.Groups objGroups = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups))); Api.FacebookMessage.FacebookMessage ApiobjFacebookMessage = new Api.FacebookMessage.FacebookMessage(); List<Domain.Socioboard.MongoDomain.FacebookMessage> lstFacebookTag = (List<Domain.Socioboard.MongoDomain.FacebookMessage>)(new JavaScriptSerializer().Deserialize(ApiobjFacebookMessage.getAllFacebookTagOfUsers(objGroups.UserId.ToString(), ProfileId), typeof(List<Domain.Socioboard.MongoDomain.FacebookMessage>))); foreach (var FacebookTag in lstFacebookTag) { lstobject.Add(FacebookTag); } dictTag.Add("facebook", lstobject); return PartialView("_Panel3Partial", dictTag); }
//[OutputCache(Duration = 45, Location = OutputCacheLocation.Client, NoStore = true)] public ActionResult UserFeeds_FeedsSearch_Twitter(string ProfileId, string keyword) { string datetime = Helper.Extensions.ToClientTime(DateTime.UtcNow); //string datetime = Request.Form["localtime"].ToString(); ViewBag.datetime = datetime; List<object> lstobject = new List<object>(); Dictionary<string, List<object>> dictUserFeeds = new Dictionary<string, List<object>>(); Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups(); Domain.Socioboard.Domain.Groups objGroups = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups))); //Data to Skip, hardcoded for now int noOfDataToSkip = 0; Api.FacebookMessage.FacebookMessage ApiobjFacebookMessage = new Api.FacebookMessage.FacebookMessage(); List<Domain.Socioboard.MongoDomain.FacebookMessage> lstFacebookUserFeeds = new List<Domain.Socioboard.MongoDomain.FacebookMessage>(); lstFacebookUserFeeds = (List<Domain.Socioboard.MongoDomain.FacebookMessage>)(new JavaScriptSerializer().Deserialize(ApiobjFacebookMessage.getAllFacebookUserFeedOfUsersByUserIdAndProfileId1WithRange(objGroups.UserId.ToString(), keyword, ProfileId, noOfDataToSkip.ToString()), typeof(List<Domain.Socioboard.MongoDomain.FacebookMessage>))); if (lstFacebookUserFeeds == null) { lstFacebookUserFeeds = new List<Domain.Socioboard.MongoDomain.FacebookMessage>(); } foreach (var FacebookUserFeeds in lstFacebookUserFeeds) { lstobject.Add(FacebookUserFeeds); } dictUserFeeds.Add("facebook", lstobject); return PartialView("_Panel3Partial", dictUserFeeds); }
public async Task<ActionResult> BindFacebookFeed(string load, string arrid) { string FacebooProfiles = string.Empty; Domain.Socioboard.Domain.User objUser = (Domain.Socioboard.Domain.User)Session["User"]; if (load == "first") { //Dictionary<Domain.Socioboard.Domain.TeamMemberProfile, object> allprofileofuser = await SBUtils.GetUserProfilesccordingToGroup(); Dictionary<Domain.Socioboard.Domain.GroupProfile, object> allprofileofuser = await SBHelper.GetGroupProfiles(); foreach (var item in allprofileofuser) { try { if (item.Key.ProfileType == "facebook") { FacebooProfiles += item.Key.ProfileId + ','; } } catch (Exception Err) { Console.Write(Err.StackTrace); } } try { FacebooProfiles = FacebooProfiles.Substring(0, (FacebooProfiles.Length - 1)); } catch (Exception ex) { Console.WriteLine(ex.StackTrace); } facebookFeedCount = 0; } else if (load == "filter") { facebookFeedCount = 0; FacebooProfiles = arrid; } else if (load == "scroll") { facebookFeedCount = facebookFeedCount + 10; FacebooProfiles = arrid; } //Api.InboxMessages.InboxMessages ApiInboxMessages = new Api.InboxMessages.InboxMessages(); Api.FacebookMessage.FacebookMessage ApiFacebookMessage = new Api.FacebookMessage.FacebookMessage(); List<Domain.Socioboard.MongoDomain.FacebookMessage> _FacebookMessage = (List<Domain.Socioboard.MongoDomain.FacebookMessage>)new JavaScriptSerializer().Deserialize(ApiFacebookMessage.GetFacebookMessageWithSentiments(FacebooProfiles, facebookFeedCount.ToString(), "10"), typeof(List<Domain.Socioboard.MongoDomain.FacebookMessage>)); if (_FacebookMessage.Count > 0) { return PartialView("_FacebookFeedPartial", _FacebookMessage); } else { return Content("no_data"); } }