如何从我的ASP更新twitter状态.网络页面
本文关键字:状态 网络 twitter 更新 我的 ASP | 更新日期: 2023-09-27 18:14:06
我正在尝试从我的asp.net网页更新我的状态。
下面是我的代码;但这不是更新。请检查我的代码并回复。
protected void btnTwitt_Click(object sender, EventArgs e)
{
string twitterMsg = txtShout.Text;
OAuthTokens tokens = new OAuthTokens();
tokens.AccessToken = "My Access Token";
tokens.AccessTokenSecret = "My Access Token Secret here";
tokens.ConsumerKey = "My Consumer Key";
tokens.ConsumerSecret = "My Consumer Secrete here";
TwitterResponse<Twitterizer.TwitterStatus> tweetResponse =
Twitterizer.TwitterStatus.Update(tokens, twitterMsg);
lblTwitMsg.Text = "Your have shout successfully on http://twitter.com/" + "";
}
下面的代码为我工作:
protected void Tweet_Click(object sender, ImageClickEventArgs e)
{
string Twet = txtTweet.InnerText;
ViewState["twe"] = Twet.ToString();
string Twttxt = ViewState["twe"].ToString();
OAuthTokens a = new OAuthTokens();
a.ConsumerSecret = consumerSecret;
a.ConsumerKey = consumerKey;
a.AccessToken = ViewState[" AccessKey "].ToString();
a.AccessTokenSecret = ViewState[" AccessSecrt"].ToString();
TwitterResponse<TwitterStatus> tweet = TwitterStatus.Update(a, "" + Twttxt + "");
txtTweet.Value = "";
DataList1.Visible = true;
string nm = ViewState[" Twitter_id"].ToString();
TimeLineLoad(nm);//function used to fill my tweets in datalist
}
给定行出现错误
TwitterResponse tweet = TwitterStatus。Update(a, " + Twttxt + ");
错误3类型或命名空间名称'TwitterResponse'无法找到(您是否缺少using指令或程序集引用?)