当前位置: 首页>>代码示例>>C#>>正文


C# Groups.Groups类代码示例

本文整理汇总了C#中Api.Groups.Groups的典型用法代码示例。如果您正苦于以下问题:C# Api.Groups.Groups类的具体用法?C# Api.Groups.Groups怎么用?C# Api.Groups.Groups使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Api.Groups.Groups类属于命名空间,在下文中一共展示了Api.Groups.Groups类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetUserProfilesccordingToGroup

        public static Dictionary<Domain.Socioboard.Domain.TeamMemberProfile, object> GetUserProfilesccordingToGroup()
        {
            User objUser = (User)System.Web.HttpContext.Current.Session["User"];
            Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups();
            ApiobjGroups.Timeout = 300000;
            //ApiobjGroups.GetGroupDetailsByGroupId
            Groups objGroups = (Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(System.Web.HttpContext.Current.Session["group"].ToString()), typeof(Groups)));
            Dictionary<Domain.Socioboard.Domain.TeamMemberProfile, object> dict_TeamMember = new Dictionary<Domain.Socioboard.Domain.TeamMemberProfile, object>();
            Api.Team.Team objApiTeam = new Api.Team.Team();
            objApiTeam.Timeout = 300000;
            JObject team = JObject.Parse(objApiTeam.GetTeamByGroupId(System.Web.HttpContext.Current.Session["group"].ToString()));
            Api.TeamMemberProfile.TeamMemberProfile objApiTeamMemberProfile = new Api.TeamMemberProfile.TeamMemberProfile();
            objApiTeamMemberProfile.Timeout = 300000;
            JArray TeamMemberProfiles = JArray.Parse(objApiTeamMemberProfile.GetTeamMemberProfilesByTeamId(Convert.ToString(team["Id"])));
            foreach (var item in TeamMemberProfiles)
            {
                try
                {
                    Domain.Socioboard.Domain.TeamMemberProfile objTeamMemberProfile = GetTeamMemberProfileFromJObject(item);

                    ISocialSiteAccount objISocialSiteAccount = GetSocialAccountFromTeamMemberProfile(objGroups.UserId, objTeamMemberProfile);
                    SocialSiteAccountFactory objSocialSiteAccountFactory = new SocialSiteAccountFactory(objTeamMemberProfile.ProfileType);
                    dict_TeamMember.Add(objTeamMemberProfile, objISocialSiteAccount);
                }
                catch (Exception ex)
                {

                    Console.WriteLine(ex.Message);
                    //return null;
                }
            }
            return dict_TeamMember;


        }
开发者ID:SaadBinShahid,项目名称:socioboard-core,代码行数:35,代码来源:SBUtils.cs

示例2: AuthenticateWordpress

 public ActionResult AuthenticateWordpress()
 {
     string wordpressredirecturl = string.Empty;
     try
     {
         Api.Groups.Groups objApiGroups = new Api.Groups.Groups();
         JObject group = JObject.Parse(objApiGroups.GetGroupDetailsByGroupId(Session["group"].ToString().ToString()));
         wordpressredirecturl = SBUtils.GetWordpressRedirectLink();
         Response.Redirect(wordpressredirecturl);
         //int profilecount = (Int16)(Session["ProfileCount"]);
         //int totalaccount = (Int16)Session["TotalAccount"];
         //if (Convert.ToString(group["GroupName"]) == "Socioboard")
         //{
         //    if (profilecount < totalaccount)
         //    {
         //        wordpressredirecturl = SBUtils.GetWordpressRedirectLink();
         //        Response.Redirect(wordpressredirecturl);
         //    }
         //    else
         //    {
         //        return RedirectToAction("Index", "Home");
         //    }
         //}
     }
     catch (Exception ex)
     {
         return RedirectToAction("Index", "Home");
     }
     return Content(wordpressredirecturl);
 }
开发者ID:NALSS,项目名称:socioboard,代码行数:30,代码来源:WordpressManagerController.cs

示例3: AuthenticateFacebook

 public ActionResult AuthenticateFacebook()
 {
     try
     {
         try
         {
             Api.Groups.Groups objApiGroups = new Api.Groups.Groups();
             JObject group = JObject.Parse(objApiGroups.GetGroupDetailsByGroupId(Session["group"].ToString().ToString()));
             int profilecount = (Int16)(Session["ProfileCount"]);
             int totalaccount = (Int16)Session["TotalAccount"];
             if (Convert.ToString(group["GroupName"]) == ConfigurationManager.AppSettings["DefaultGroupName"].ToString())
             {
                 if (profilecount < totalaccount)
                 {
                     Session["fbSocial"] = "a";
                     string facebookurl = "http://www.facebook.com/dialog/oauth/?scope=user_friends,read_friendlists,publish_actions,publish_stream,read_stream,read_insights,manage_pages,user_checkins,user_photos,read_mailbox,manage_notifications,read_page_mailboxes,email,user_videos,user_groups,offline_access,publish_actions,manage_pages&client_id=" + ConfigurationManager.AppSettings["ClientId"] + "&redirect_uri=" + ConfigurationManager.AppSettings["RedirectUrl"] + "&response_type=code";
                     Response.Redirect(facebookurl);
                 }
                 else
                 {
                 }
             }
         }
         catch (Exception ex)
         {
         }
     }
     catch (Exception ex)
     {
     }
     return View();
 }
开发者ID:prog-moh,项目名称:socioboard-core,代码行数:32,代码来源:SocialManagerController.cs

示例4: wallposts

 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);
 }
开发者ID:NALSS,项目名称:socioboard,代码行数:25,代码来源:FeedsController.cs

示例5: AuthenticateTumblr

 public ActionResult AuthenticateTumblr()
 {
     try
     {
         try
         {
             Api.Groups.Groups objApiGroups = new Api.Groups.Groups();
             JObject group = JObject.Parse(objApiGroups.GetGroupDetailsByGroupId(Session["group"].ToString().ToString()));
             int profilecount = 0;
             int totalaccount = 0;
             try
             {
                 profilecount = (Int16)(Session["ProfileCount"]);
                 totalaccount = (Int16)Session["TotalAccount"];
             }
             catch (Exception ex)
             {
                 logger.Error("ex.Message : " + ex.Message);
                 logger.Error("ex.StackTrace : " + ex.StackTrace);
             }
             if (Convert.ToString(group["GroupName"]) == ConfigurationManager.AppSettings["DefaultGroupName"].ToString())
             {
                 if (profilecount < totalaccount)
                 {
                     Api.Tumblr.Tumblr ApiobjTumblr = new Api.Tumblr.Tumblr();
                     string redircturl = ApiobjTumblr.GetTumblrRedirectUrl(ConfigurationManager.AppSettings["TumblrClientKey"], ConfigurationManager.AppSettings["TumblrClientSec"], ConfigurationManager.AppSettings["TumblrCallBackURL"]);
                     Response.Redirect(redircturl);
                 }
                 else if (profilecount == 0 || totalaccount == 0)
                 {
                     Api.Tumblr.Tumblr ApiobjTumblr = new Api.Tumblr.Tumblr();
                     string redircturl = ApiobjTumblr.GetTumblrRedirectUrl(ConfigurationManager.AppSettings["TumblrClientKey"], ConfigurationManager.AppSettings["TumblrClientSec"], ConfigurationManager.AppSettings["TumblrCallBackURL"]);
                     Response.Redirect(redircturl);
                 }
                 else
                 {
                     return RedirectToAction("Index", "Home");
                 }
             }
             else 
             {
                 logger.Error("AuthenticateTumblr =>" + Convert.ToString(group["GroupName"]) + "!=" + ConfigurationManager.AppSettings["DefaultGroupName"].ToString());
                 return RedirectToAction("Index", "Home");
             }
         }
         catch (Exception ex)
         {
             logger.Error("AuthenticateTumblr => "+ex.Message);
             logger.Error("AuthenticateTumblr => "+ex.StackTrace);
             return RedirectToAction("Index", "Home");
         }
     }
     catch (Exception ex)
     {
     }
     return RedirectToAction("Index", "Home");
 }
开发者ID:prog-moh,项目名称:socioboard-core,代码行数:57,代码来源:TumblrManagerController.cs

示例6: AuthenticateLinkedin

        public ActionResult AuthenticateLinkedin()
        {

            try
            {
                try
                {
                    Api.Groups.Groups objApiGroups = new Api.Groups.Groups();
                    JObject group = JObject.Parse(objApiGroups.GetGroupDetailsByGroupId(Session["group"].ToString().ToString()));
                    int profilecount = 0;
                    int totalaccount = 0;
                    try
                    {
                        profilecount = (Int16)(Session["ProfileCount"]);
                        totalaccount = (Int16)Session["TotalAccount"];
                    }
                    catch (Exception ex)
                    {
                        logger.Error("ex.Message : " + ex.Message);
                        logger.Error("ex.StackTrace : " + ex.StackTrace);
                    }
                    if (Convert.ToString(group["GroupName"]) == ConfigurationManager.AppSettings["DefaultGroupName"].ToString())
                    {
                        if (profilecount < totalaccount)
                        {
                            Session["linSocial"] = "a";
                            Api.Linkedin.Linkedin objApiLinkedin = new Api.Linkedin.Linkedin();
                            string redircturl = objApiLinkedin.GetLinkedinRedirectUrl(ConfigurationManager.AppSettings["LiApiKey"], ConfigurationManager.AppSettings["LiSecretKey"]);
                            Session["reuqestToken"] = redircturl.Split('~')[1].ToString();
                            Session["reuqestTokenSecret"] = redircturl.Split('~')[2].ToString();
                            redircturl = redircturl.Split('~')[0].ToString();
                            Response.Redirect(redircturl);
                        }
                        else if (profilecount == 0 || totalaccount == 0)
                        {
                            Session["linSocial"] = "a";
                            Api.Linkedin.Linkedin objApiLinkedin = new Api.Linkedin.Linkedin();
                            string redircturl = objApiLinkedin.GetLinkedinRedirectUrl(ConfigurationManager.AppSettings["LiApiKey"], ConfigurationManager.AppSettings["LiSecretKey"]);
                            Session["reuqestToken"] = redircturl.Split('~')[1].ToString();
                            Session["reuqestTokenSecret"] = redircturl.Split('~')[2].ToString();
                            redircturl = redircturl.Split('~')[0].ToString();
                            Response.Redirect(redircturl);
                        }
                        else
                        {
                        }
                    }
                }
                catch (Exception ex)
                {
                }
            }
            catch (Exception ex)
            {
            }
            return View();
        }
开发者ID:leaspb,项目名称:socioboard-core,代码行数:57,代码来源:LinkedinManagerController.cs

示例7: linPage_connect

        //public ActionResult Linkedin()
        //{
        //    Session["LinkedinCompanyPage"] = null;
        //    Domain.Socioboard.Domain.User objUser = (Domain.Socioboard.Domain.User)Session["User"];
        //    string oauth_token = Request.QueryString["oauth_token"];
        //    string oauth_verifier = Request.QueryString["oauth_verifier"];
        //    string reuqestTokenSecret=Session["reuqestTokenSecret"].ToString();
        //    if (Session["linSocial"] == "a")
        //    {
        //        Api.Linkedin.Linkedin objApiLinkedin = new Api.Linkedin.Linkedin();
        //        string AddLinkedinAccount = objApiLinkedin.AddLinkedinAccount(oauth_token, oauth_verifier, reuqestTokenSecret, ConfigurationManager.AppSettings["LiApiKey"], ConfigurationManager.AppSettings["LiSecretKey"], objUser.Id.ToString(), Session["group"].ToString());
        //        Session["SocialManagerInfo"] = AddLinkedinAccount;
        //        return RedirectToAction("Index", "Home");
        //    }
        //    else

        //    {
        //        Api.LinkedinCompanyPage.LinkedinCompanyPage objLiCompanyPage = new Api.LinkedinCompanyPage.LinkedinCompanyPage();

        //        List<Helper.AddliPage> lstLinkedinCompanyPage = new List<Helper.AddliPage>();

        //        string page = objLiCompanyPage.GetLinkedinCompanyPage(oauth_token, oauth_verifier, reuqestTokenSecret, ConfigurationManager.AppSettings["LiApiKey"], ConfigurationManager.AppSettings["LiSecretKey"], objUser.Id.ToString(), Session["group"].ToString());
        //        lstLinkedinCompanyPage = (List<Helper.AddliPage>)(new JavaScriptSerializer().Deserialize(page, typeof(List<Helper.AddliPage>)));
        //        Session["LinkedinCompanyPage"] = lstLinkedinCompanyPage;
        //        return RedirectToAction("Index", "Home", new { hint = "linpage" });
        //    }
        //}
      

         public ActionResult linPage_connect()
        {
            string redirectURL = "";
            try
            {
                try
                {
                    Api.Groups.Groups objApiGroups = new Api.Groups.Groups();
                    JObject group = JObject.Parse(objApiGroups.GetGroupDetailsByGroupId(Session["group"].ToString().ToString()));
                    int profilecount = (Int16)(Session["ProfileCount"]);
                    int totalaccount = (Int16)Session["TotalAccount"];
                    if (Convert.ToString(group["GroupName"]) == ConfigurationManager.AppSettings["DefaultGroupName"].ToString())
                    {
                        if (profilecount < totalaccount)
                        {
                            Session["linSocial"] = "p";
                            Api.Linkedin.Linkedin objApiLinkedin = new Api.Linkedin.Linkedin();
                            string redircturl = objApiLinkedin.GetLinkedinRedirectUrl(ConfigurationManager.AppSettings["LiApiKey"], ConfigurationManager.AppSettings["LiSecretKey"]);
                            Session["reuqestToken"] = redircturl.Split('~')[1].ToString();
                            Session["reuqestTokenSecret"] = redircturl.Split('~')[2].ToString();
                            redircturl = redircturl.Split('~')[0].ToString();
                            redirectURL = redircturl;
                            //Response.Redirect(redircturl);

                        }
                        else
                        {
                        }
                    }
                }
                catch (Exception ex)
                {
                    logger.Error(ex.Message);

                }
            }
            catch (Exception ex)
            {
                logger.Error(ex.Message);
               
            }
            return Content(redirectURL);//View();
        }
开发者ID:socioboard,项目名称:socioboard-core,代码行数:72,代码来源:LinkedinManagerController.cs

示例8: AuthenticateTwitter

 public ActionResult AuthenticateTwitter()
 {
     try
     {
         try
         {
             Api.Groups.Groups objApiGroups = new Api.Groups.Groups();
             JObject group = JObject.Parse(objApiGroups.GetGroupDetailsByGroupId(Session["group"].ToString().ToString()));
             int profilecount = (Int16)(Session["ProfileCount"]);
             int totalaccount = (Int16)Session["TotalAccount"];
             if (Convert.ToString(group["GroupName"]) == ConfigurationManager.AppSettings["DefaultGroupName"].ToString())
             {
                 if (profilecount < totalaccount)
                 {
                     Api.Twitter.Twitter apiobjTwitter = new Api.Twitter.Twitter();
                     string TwitterUrl = apiobjTwitter.GetTwitterRedirectUrl(ConfigurationManager.AppSettings["consumerKey"], ConfigurationManager.AppSettings["consumerSecret"], ConfigurationManager.AppSettings["callbackurl"]);
                     string str = TwitterUrl.Split('~')[0].ToString();
                     Session["requestSecret"] = TwitterUrl.Split('~')[1].ToString();
                     Response.Redirect(TwitterUrl.Split('~')[0].ToString());
                 }
                 else
                 {
                 }
             }
         }
         catch (Exception ex)
         {
         }
     }
     catch (Exception ex)
     {
     }
     return View();
 }
开发者ID:prog-moh,项目名称:socioboard-core,代码行数:34,代码来源:SocialManagerController.cs

示例9: AjaxFeeds

        public ActionResult AjaxFeeds(string profileid, string load)
        {
            string datetime = Helper.Extensions.ToClientTime(DateTime.UtcNow);
            //string datetime = Request.Form["localtime"].ToString();
            ViewBag.datetime = datetime;
            List<object> lstobject = new List<object>();
            if (load == "first")
            {
                Session["FacebookProfileIdForFeeds"] = profileid;
                facebookfeedcount = 0;
            }
            else
            {
                profileid = (string)Session["FacebookProfileIdForFeeds"];
                facebookfeedcount = facebookfeedcount + 10;
            }
            Dictionary<string, List<object>> dictwallposts = 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.FacebookFeed.FacebookFeed ApiobjFacebookFeed = new Api.FacebookFeed.FacebookFeed();
            List<MongoFacebookFeed> lstFacebookFeed = (List<MongoFacebookFeed>)(new JavaScriptSerializer().Deserialize(ApiobjFacebookFeed.getAllFacebookFeedsByUserIdAndProfileId1(objGroups.UserId.ToString(), profileid, facebookfeedcount), typeof(List<MongoFacebookFeed>)));
            foreach (var twittermsg in lstFacebookFeed)
            {
                lstobject.Add(twittermsg);
            }
            dictwallposts.Add("facebook", lstobject);
            if (lstFacebookFeed.Count > 0)
            {
                return PartialView("_Panel2Partial", dictwallposts);
            }
            else
            {
                return Content("no_data");
            }

        }
开发者ID:socioboard,项目名称:socioboard-core,代码行数:36,代码来源:FeedsController.cs

示例10: DeleteGroup

 public ActionResult DeleteGroup(string Groupid)
 {
     User objUser = (User)Session["User"];
     Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups();
     ApiobjGroups.DeleteGroupById(Groupid, objUser.Id.ToString());
     return Content("");
 }
开发者ID:prog-moh,项目名称:socioboard-core,代码行数:7,代码来源:UserGroupController.cs

示例11: ShowInstagramFeeds

        public ActionResult ShowInstagramFeeds(string load, string id)
        {

            if (load == "first")
            {
                Session["InsragramIdForFeeds"] = id;
                instagramfeedcount = 0;
            }
            else
            {
                id = (string)Session["InsragramIdForFeeds"];
                instagramfeedcount = instagramfeedcount + 8;
            }

            object lstobject = new object();
            List<object> lstComment = null;
            Domain.Socioboard.Domain.User _User = (Domain.Socioboard.Domain.User)Session["User"];
            Dictionary<string, Dictionary<object, List<object>>> dictwallposts = new Dictionary<string, Dictionary<object, List<object>>>();
            Dictionary<object, List<object>> dic_InstgramImg = new Dictionary<object, 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.InstagramFeed.InstagramFeed ApiobjInstagramFeed = new Api.InstagramFeed.InstagramFeed();
            Api.InstagramComment.InstagramComment ApiobjInstagramFeedComment = new Api.InstagramComment.InstagramComment();


            List<Domain.Socioboard.MongoDomain.InstagramFeed> lstInstagramFeed = (List<Domain.Socioboard.MongoDomain.InstagramFeed>)(new JavaScriptSerializer().Deserialize(ApiobjInstagramFeed.GetFeedsOfProfileWithRange(objGroups.UserId.ToString(), id, instagramfeedcount.ToString(), "8"), typeof(List<Domain.Socioboard.MongoDomain.InstagramFeed>)));
            foreach (var item_lstInstagramfeed in lstInstagramFeed)
            {
                lstComment = new List<object>();
                List<Domain.Socioboard.MongoDomain.InstagramComment> lstInstagramComment = (List<Domain.Socioboard.MongoDomain.InstagramComment>)(new JavaScriptSerializer().Deserialize(ApiobjInstagramFeedComment.GetInstagramFeedsComment(objGroups.UserId.ToString(), item_lstInstagramfeed.FeedId.ToString()), typeof(List<Domain.Socioboard.MongoDomain.InstagramComment>)));
                foreach (var item in lstInstagramComment)
                {
                    lstComment.Add(item);
                }
                lstobject = (object)item_lstInstagramfeed;
                dic_InstgramImg.Add(lstobject, lstComment);
            }
            dictwallposts.Add("instagram", dic_InstgramImg);
            return PartialView("_InstagramPartial", dictwallposts);
        }
开发者ID:socioboard,项目名称:socioboard-core,代码行数:40,代码来源:FeedsController.cs

示例12: AuthenticateFacebook

        public ActionResult AuthenticateFacebook(string op)
        {
            Session["fblogin"] = null;
            string facebookurl = "../index/index";
            if (!string.IsNullOrEmpty(op))
            {

                if (op == "fbgroup")
                {
                    Session["fblogin"] = op;
                    facebookurl = Helper.SBUtils.GetFacebookRedirectLink();
                }
                else if (op == "page")
                {
                    int profilecount = (Int16)(Session["ProfileCount"]);
                    int totalaccount = (Int16)Session["TotalAccount"];
                    if (profilecount < totalaccount)
                    {
                        Session["fblogin"] = op;
                        facebookurl = Helper.SBUtils.GetFacebookRedirectLink();
                    }
                    else { }
                }
                else if (op == "fblogin")
                {
                    Session["fblogin"] = op;
                    //if (System.Web.HttpContext.Current.Request.Url.Authority.ToLower().Equals("socioboard.com")) 
                    //{
                    //    Session["fbloginredircturl"] = "http://socioboard.com/FacebookManager/Facebook";
                    //    facebookurl = "http://www.facebook.com/v2.0/dialog/oauth/?scope=user_friends,read_friendlists,publish_actions,publish_stream,read_stream,read_insights,manage_pages,user_checkins,user_photos,read_mailbox,manage_notifications,read_page_mailboxes,email,user_videos,user_groups,offline_access,publish_actions,manage_pages&client_id=" + ConfigurationManager.AppSettings["ClientId"] + "&redirect_uri=http://socioboard.com/FacebookManager/Facebook&response_type=code";
                    //}
                    //else if (System.Web.HttpContext.Current.Request.Url.Authority.ToLower().Equals("www.socioboard.com"))
                    //{
                    //    Session["fbloginredircturl"] = "http://www.socioboard.com/FacebookManager/Facebook";
                    //    facebookurl = "http://www.facebook.com/v2.0/dialog/oauth/?scope=user_friends,read_friendlists,publish_actions,publish_stream,read_stream,read_insights,manage_pages,user_checkins,user_photos,read_mailbox,manage_notifications,read_page_mailboxes,email,user_videos,user_groups,offline_access,publish_actions,manage_pages&client_id=" + ConfigurationManager.AppSettings["ClientId"] + "&redirect_uri=http://www.socioboard.com/FacebookManager/Facebook&response_type=code";
                    //}
                    //else 
                    //{
                    //    facebookurl = Helper.SBUtils.GetFacebookRedirectLink();
                    //}
                    facebookurl = Helper.SBUtils.GetFacebookRedirectLink();
                    //string aksdjf =  System.Web.HttpContext.Current.Request.Url.AbsoluteUri;

                }
            }
            else
            {
                Session["addfbaccount"] = "true";
                try
                {
                    try
                    {
                        Api.Groups.Groups objApiGroups = new Api.Groups.Groups();
                        logger.Error(Session["group"]);
                        logger.Error(Session["group"].ToString());
                        JObject group = JObject.Parse(objApiGroups.GetGroupDetailsByGroupId(Session["group"].ToString().ToString()));
                        logger.Error(Session["ProfileCount"]);
                        logger.Error(Session["TotalAccount"]);
                        int profilecount = 0;
                        int totalaccount = 0;
                        try
                        {
                            profilecount = (Int16)(Session["ProfileCount"]);
                            totalaccount = (Int16)Session["TotalAccount"];
                        }
                        catch (Exception ex)
                        {
                            logger.Error("ex.Message : " + ex.Message);
                            logger.Error("ex.StackTrace : " + ex.StackTrace);
                        }

                        if (Convert.ToString(group["GroupName"]) == ConfigurationManager.AppSettings["DefaultGroupName"].ToString())
                        {
                            if (profilecount < totalaccount)
                            {
                                Session["fbSocial"] = "a";
                                facebookurl = Helper.SBUtils.GetFacebookRedirectLink();
                                Response.Redirect(facebookurl);
                            }
                            else if (profilecount == 0 || totalaccount == 0)
                            {
                                Session["fbSocial"] = "a";
                                facebookurl = Helper.SBUtils.GetFacebookRedirectLink();
                                Response.Redirect(facebookurl);
                            }
                            else
                            {
                                Response.Redirect("../Home/Index");
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        logger.Error("ex.Message : " + ex.Message);
                        logger.Error("ex.StackTrace : " + ex.StackTrace);
                    }
                }
                catch (Exception ex)
                {
                    logger.Error(ex.Message);
//.........这里部分代码省略.........
开发者ID:prog-moh,项目名称:socioboard-core,代码行数:101,代码来源:FacebookManagerController.cs

示例13: AddLoadNewFacebookNewsFeeds

        //Added by Sumit Gupta[15-02-2015]
        //[OutputCache(Duration = 45, Location = OutputCacheLocation.Client, NoStore = true)]
        public ActionResult AddLoadNewFacebookNewsFeeds(string profileid)
        {
            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>> dictFeeds = new Dictionary<string, List<object>>();

            Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups();
            Dictionary<string, List<object>> dictwallposts = new Dictionary<string, List<object>>();
            Domain.Socioboard.Domain.Groups objGroups = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
            Api.FacebookFeed.FacebookFeed ApiobjFacebookFeed = new Api.FacebookFeed.FacebookFeed();

            Api.Facebook.Facebook ApiobjFacebook = new Api.Facebook.Facebook();

            List<MongoFacebookFeed> lstFacebookFeed = new List<MongoFacebookFeed>();

            try
            {
                lstFacebookFeed = (List<MongoFacebookFeed>)(new JavaScriptSerializer().Deserialize(ApiobjFacebook.AddNewFacebookFeeds(profileid, objGroups.UserId.ToString()), typeof(List<MongoFacebookFeed>)));
            }
            catch (Exception ex)
            {
                lstFacebookFeed = null;
            }
            if (lstFacebookFeed == null)
            {
                lstFacebookFeed = new List<MongoFacebookFeed>();
            }
            foreach (var FacebookFeed in lstFacebookFeed)
            {
                lstobject.Add(FacebookFeed);
            }
            dictwallposts.Add("facebook", lstobject);

            return PartialView("_Panel2Partial", dictwallposts);
        }
开发者ID:socioboard,项目名称:socioboard-core,代码行数:39,代码来源:FeedsController.cs

示例14: LoadGroup

        public ActionResult LoadGroup()
        {
            User objUser = (User)Session["User"];
            Api.Groups.Groups objApiGroups = new Api.Groups.Groups();
            objApiGroups.Timeout = 300000;
            JArray profile = JArray.Parse(objApiGroups.GetGroupDetailsByUserId(objUser.Id.ToString()));

            List<Groups> lstgroup = new List<Groups>();
            foreach (var item in profile)
            {
                Groups objGroups = new Groups();
                objGroups.Id = Guid.Parse(Convert.ToString(item["Id"]));
                objGroups.GroupName = Convert.ToString(item["GroupName"]);
                objGroups.UserId = Guid.Parse(Convert.ToString(item["UserId"]));
                objGroups.EntryDate = Convert.ToDateTime(Convert.ToString(item["EntryDate"]));
                lstgroup.Add(objGroups);
            }

            return PartialView("_LoadGroupPartial", lstgroup);

        }
开发者ID:leaspb,项目名称:socioboard-core,代码行数:21,代码来源:HomeController.cs

示例15: TumblrImages

        public ActionResult TumblrImages(string profileid, string load)
        {
            if (load == "first")
            {
                Session["TumblerProfileIdForImages"] = profileid;
                tumblerimagecount = 0;
            }
            else
            {
                profileid = (string)Session["TumblerProfileIdForImages"];
                tumblerimagecount = tumblerimagecount + 6;
            }

            object lstobject = new object();
            List<object> lstComment = null;
            Dictionary<string, Dictionary<object, List<object>>> dictwallposts = new Dictionary<string, Dictionary<object, List<object>>>();
            Dictionary<object, List<object>> dic_TumblrImg = new Dictionary<object, 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.TumblrFeed.TumblrFeed ApiobjTumblrFeed = new Api.TumblrFeed.TumblrFeed();
            //List<Domain.Socioboard.Domain.TumblrFeed> lstTumblrFeed = (List<Domain.Socioboard.Domain.TumblrFeed>)(new JavaScriptSerializer().Deserialize(ApiobjTumblrFeed.GetAllTumblrFeedOfUsers(objGroups.UserId.ToString(), profileid), typeof(List<Domain.Socioboard.Domain.TumblrFeed>)));
            //GetFeedsOfProfileWithRange
            List<Domain.Socioboard.MongoDomain.TumblrFeed> lstTumblrFeed = (List<Domain.Socioboard.MongoDomain.TumblrFeed>)(new JavaScriptSerializer().Deserialize(ApiobjTumblrFeed.GetAllTumblrFeedOfUsersWithRange(objGroups.UserId.ToString(), profileid, tumblerimagecount.ToString()), typeof(List<Domain.Socioboard.MongoDomain.TumblrFeed>)));
            foreach (var item_lstTumblrFeed in lstTumblrFeed)
            {
                lstComment = new List<object>();

                lstobject = (object)item_lstTumblrFeed;
                dic_TumblrImg.Add(lstobject, lstComment);
            }
            dictwallposts.Add("tumblr", dic_TumblrImg);
            return PartialView("_ImagePartial", dictwallposts);


        }
开发者ID:socioboard,项目名称:socioboard-core,代码行数:35,代码来源:FeedsController.cs


注:本文中的Api.Groups.Groups类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。