Ejemplo n.º 1
0
        public bool UpdateBackgroundImage(string localImagePath, string postAuthenticityToken, ref Globussoft.GlobusHttpHelper globusHttpHelper)
        {
            string res_ProfilePage = globusHttpHelper.getHtmlfromUrl(new Uri("https://twitter.com/settings/design"), "", "");

            string status = "";

            if (!res_ProfilePage.Contains("/account/suspended_help") && !res_ProfilePage.Contains("Suspended Accounts"))
            {
                globusHttpHelper.MultiPartImageUploadForBackgroundImage(localImagePath, postAuthenticityToken, ref status);

                if (status == "okay")
                {
                    Log("[ " + DateTime.Now + " ] => [ Background Pic Updated ]");
                    return true;
                }
            }
            else
            {
                Log("[ " + DateTime.Now + " ] => [ Account Suspended ]");
                return false;
            }
            return false;
        }