我正在尝试从我的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/" + "";
}
答案 0 :(得分:1)
以下代码对我有用:
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
}
答案 1 :(得分:1)
我在给定的行上面临错误
TwitterResponse tweet = TwitterStatus.Update(a,“”+ Twttxt +“”);
错误3找不到类型或命名空间名称'TwitterResponse'(您是否缺少using指令或程序集引用?)