public void FollowUrls(ref InstagramAccountManager accountManager, string url) { //Thread.Sleep(2000); string followStatus = string.Empty; try { string user = accountManager.Username; InstagramFollow objInstagramFollow = new InstagramFollow(); try { DataSet DS = DataBaseHandler.SelectQuery("Select FollowStatus from FollowInfo where AccountHolder='" + user + "' and FollowingUser='******'", "FollowInfo"); if (DS.Tables[0].Rows.Count != 0) { followStatus = DS.Tables[0].Rows[0].ItemArray[0].ToString(); } } catch (Exception ex) { } if (!(followStatus == "Followed")) { //if (!(counterFollow == ClGlobul.NumberOfProfilesToFollow)) { string status = objInstagramFollow.Follow(url, ref accountManager); // Thread.Sleep(ClGlobul.hashTagDelay * 1000); counterFollow++; if (status == "Followed") { Log("[ " + DateTime.Now + "] " + "[ Profile followed with url : " + url + " with User = "******" ]"); } else { Log("[ " + DateTime.Now + "] " + "[ Profile not followed with url : " + url + " with User = "******" ]"); //Log("[ " + DateTime.Now + "] " + " [ " + ClGlobul.NumberOfProfilesToFollow + " profiles Unfollowed ]"); } } //else { //ClGlobul.isFollowLimitReached = true; //Log("[ " + DateTime.Now + "] " + " [ " + ClGlobul.NumberOfProfilesToFollow + " profiles followed ]"); // return; } } } catch (Exception ex) { GramBoardProFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnMsgFrom_Click() --> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, GramBoardProFileHelper.ErrorLogFilePath); } }
public void FollowUrls(ref InstagramAccountManager accountManager, string url) { //Thread.Sleep(2000); string followStatus = string.Empty; try { string user = accountManager.Username; InstagramFollow objInstagramFollow = new InstagramFollow(); try { DataSet DS = DataBaseHandler.SelectQuery("Select FollowStatus from FollowInfo where AccountHolder='" + user + "' and FollowingUser='******'", "FollowInfo"); if (DS.Tables[0].Rows.Count != 0) { followStatus = DS.Tables[0].Rows[0].ItemArray[0].ToString(); } } catch(Exception ex) { } if (!(followStatus == "Followed")) { //if (!(counterFollow == ClGlobul.NumberOfProfilesToFollow)) { string status = objInstagramFollow.Follow(url, ref accountManager); // Thread.Sleep(ClGlobul.hashTagDelay * 1000); counterFollow++; if (status == "Followed") { Log("[ " + DateTime.Now + "] " + "[ Profile followed with url : " + url + " with User = "******" ]"); } else { Log("[ " + DateTime.Now + "] " + "[ Profile not followed with url : " + url + " with User = "******" ]"); //Log("[ " + DateTime.Now + "] " + " [ " + ClGlobul.NumberOfProfilesToFollow + " profiles Unfollowed ]"); } } //else { //ClGlobul.isFollowLimitReached = true; //Log("[ " + DateTime.Now + "] " + " [ " + ClGlobul.NumberOfProfilesToFollow + " profiles followed ]"); // return; } } } catch (Exception ex) { GramBoardProFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnMsgFrom_Click() --> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, GramBoardProFileHelper.ErrorLogFilePath); } }