Exemplo n.º 1
0
 public void linkedincompanypagetest()
 {
     oAuthLinkedIn Linkedin_oauth = new oAuthLinkedIn();
     string authLink = Linkedin_oauth.AuthorizationLinkGet();
     Session["reuqestToken"] = Linkedin_oauth.Token;
     Session["reuqestTokenSecret"] = Linkedin_oauth.TokenSecret;
     Response.Redirect(authLink);
 }
Exemplo n.º 2
0
        public void AuthenticateLinkedin(object sender, EventArgs e)
        {
            oAuthLinkedIn Linkedin_oauth = new oAuthLinkedIn();
            string authLink = Linkedin_oauth.AuthorizationLinkGet();
            Session["reuqestToken"] = Linkedin_oauth.Token;
            Session["reuqestTokenSecret"] = Linkedin_oauth.TokenSecret;

            Response.Redirect(authLink);
        }
Exemplo n.º 3
0
        public string GetLinkedinRedirectUrl(string consumerKey, string consumerSecret)
        {
            logger.Error("GetLinkedinRedirectUrl()");

            System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls;

            string authLink = string.Empty;
            oAuthLinkedIn Linkedin_oauth = new oAuthLinkedIn();
            Linkedin_oauth.ConsumerKey = consumerKey;
            Linkedin_oauth.ConsumerSecret = consumerSecret;
            authLink = Linkedin_oauth.AuthorizationLinkGet() + "~" + Linkedin_oauth.Token + "~" + Linkedin_oauth.TokenSecret;
            //Session["reuqestToken"] = Linkedin_oauth.Token;
            //Session["reuqestTokenSecret"] = Linkedin_oauth.TokenSecret;
            return authLink;
        }
Exemplo n.º 4
0
 public void AuthenticateLinkedin(object sender, EventArgs e)
 {
     try
     {
         int profilecount = (int)Session["ProfileCount"];
         int totalaccount = (int)Session["TotalAccount"];
         if (profilecount < totalaccount)
         {
             oAuthLinkedIn Linkedin_oauth = new oAuthLinkedIn();
             string authLink = Linkedin_oauth.AuthorizationLinkGet();
             Session["reuqestToken"] = Linkedin_oauth.Token;
             Session["reuqestTokenSecret"] = Linkedin_oauth.TokenSecret;
             Response.Redirect(authLink);
         }
         else
         {
             Response.Write("<script>SimpleMessageAlert('Change the Plan to Add More Accounts');</script>");
         }
     }
     catch (Exception ex)
     {
         logger.Error(ex.Message);
     }
 }
Exemplo n.º 5
0
        public void AuthenticateLinkedin(object sender, EventArgs e)
        {
            try
            {
                GroupRepository objGroupRepository = new GroupRepository();
                SocioBoard.Domain.Team team = (SocioBoard.Domain.Team)Session["GroupName"];
                Groups lstDetails = objGroupRepository.getGroupName(team.GroupId);

                try
                {
                    int profilecount = (int)Session["ProfileCount"];
                    int totalaccount = (int)Session["TotalAccount"];
                    if (lstDetails.GroupName == "Socioboard")
                    {
                        if (profilecount < totalaccount)
                        {
                            oAuthLinkedIn Linkedin_oauth = new oAuthLinkedIn();
                            string authLink = Linkedin_oauth.AuthorizationLinkGet();
                            Session["reuqestToken"] = Linkedin_oauth.Token;
                            Session["reuqestTokenSecret"] = Linkedin_oauth.TokenSecret;

                            this.LinkedInLink.HRef = "";
                            this.LinkedInLink.HRef = authLink;
                            Response.Redirect(authLink);
                        }
                        else
                        {
                            //Response.Write("<script>SimpleMessageAlert('Change the Plan to Add More Accounts');</script>");
                            ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Change the Plan to Add More Accounts');", true);
                        }
                    }
                }
                catch (Exception ex)
                {
                    logger.Error(ex.Message);
                }
            }
            catch (Exception ex)
            {
                logger.Error(ex.Message);
            }
        }
Exemplo n.º 6
0
        public void LinkedInRedirect(object sender, EventArgs e)
        {
            if (ddlGroup.SelectedItem.Text != "Select")
            {

                oAuthLinkedIn Linkedin_oauth = new oAuthLinkedIn();
                string authLink = Linkedin_oauth.AuthorizationLinkGet();
                Session["reuqestToken"] = Linkedin_oauth.Token;
                Session["reuqestTokenSecret"] = Linkedin_oauth.TokenSecret;

                Session["UserAndGroupsForFacebook"] = "linkedin";
                Response.Redirect(authLink);
            }
            else
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "test", "<script type=\"text/javascript\">alert(\"Select the group to add profiles\")</script>", false);

            }
        }
Exemplo n.º 7
0
        public void AuthenticateLinkedin(object sender, EventArgs e)
        {
            try
            {
                int profilecount = (int)Session["ProfileCount"];
                int totalaccount = (int)Session["TotalAccount"];
                if (profilecount < totalaccount)
                {
                    oAuthLinkedIn Linkedin_oauth = new oAuthLinkedIn();
                    string authLink = Linkedin_oauth.AuthorizationLinkGet();
                    Session["reuqestToken"] = Linkedin_oauth.Token;
                    Session["reuqestTokenSecret"] = Linkedin_oauth.TokenSecret;

                    this.LinkedInLink.HRef = "";
                    this.LinkedInLink.HRef = authLink;
                    Response.Redirect(authLink);
                }
                else
                {
                    //Response.Write("<script>SimpleMessageAlert('Change the Plan to Add More Accounts');</script>");
                    ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Change the Plan to Add More Accounts');", true);
                }
            }
            catch (Exception ex)
            {
                logger.Error(ex.Message);
            }
        }