Web/app/sina/weibo.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using OAuth.Sina;
namespace Web.App.Sina
{
public partial class weibo : Web.UI.FrontPassport
{
protected SinaApi sinaApi = new SinaApi();
protected SinaUser sinaUser = new SinaUser();
protected void Page_Load(object sender, EventArgs e)
{
sinaUser = sinaApi.verify_credentials();
if (sinaUser == null)
{
Response.Redirect("oauth.aspx?mode=sendweibo&type=login");
}
//this.txtContent.Text = q("msg");
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
try
{
sinaApi.PublicWeibo(this.txtContent.Text);
this.lblMsg.Text = "发表成功!";
}
catch (Exception ex) { this.lblMsg.Text = "发表失败! <br /><br />" + ex.Message + ""; }
}
protected void lbLogout_Click(object sender, EventArgs e)
{
sinaApi.DisConnectSina();
Response.Redirect("Default.aspx");
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。