protected override void TwitterAuthenticate() { base.TwitterAuthenticate(); try { twdata = new Twitter(Twitter.TwitterType.Friends); } catch (Exception) { //do nothing } if (twdata != null) { try { twdata.FirstCallData(resource_urlFormat, friendsorfollowers, count, string.Empty); } catch (Exception ex) { //do nothing lblError.Text = ex.Message; lblError.Visible = true; } finally { if (twdata != null) { listUsers = twdata.listFollowers; } } GetData(true); } }
protected override void TwitterAuthenticate() { base.TwitterAuthenticate(); try { twdata = new Twitter(Twitter.TwitterType.TimeLine); } catch (Exception) { //do nothing } if (twdata != null) { try { if (btnNext.Text == Resources.Resource.First) { twdata.FirstCallData(resource_urlFormat, friendsorfollowers, count, string.Empty); } else { if (btnNextClicked && ListTimeLine != null && string.IsNullOrEmpty(txtLastID.Text) && ListTimeLine.Count > 0) { twdata.FirstCallData(resource_urlFormat, friendsorfollowers, count, string.Empty, ListTimeLine[ListTimeLine.Count - 1].ID.ToString()); } else { if (string.IsNullOrEmpty(txtLastID.Text)) { twdata.FirstCallData(resource_urlFormat, friendsorfollowers, count, string.Empty); } else { twdata.FirstCallData(resource_urlFormat, friendsorfollowers, count, string.Empty, txtLastID.Text); } } } } catch (Exception ex) { //do nothing lblError.Text = ex.Message; lblError.Visible = true; } finally { if (twdata != null) { ListTimeLine = twdata.listTimeline; } } GetData(true); btnNext.Visible = true; } }