1
回答
android模拟登陆新浪微博 cookie拿不到 登陆不成功求问
科大讯飞通用文字识别100000次/天免费使用。立即申请   

返回值是这个

<html>

<head>
<title>����ͨ��֤</title>
<meta http-equiv="refresh" content="0; url=&#39;http://weibo.com/ajaxlogin.php?framelogin=1&callback=parent.sinaSSOController.feedBackUrlCallBack&sudaref=login.sina.com.cn&retcode=4401&reason=%B1%A7%C7%B8%A3%A1%B5%C7%C2%BC%CA%A7%B0%DC%A3%AC%C7%EB%C9%D4%BA%F2%D4%D9%CA%D4&#39;"/>
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
</head>
<body bgcolor="#ffffff" text="#000000" link="#0000cc" vlink="#551a8b" alink="#ff0000">
<script type="text/javascript" language="javascript">
location.replace("http://weibo.com/ajaxlogin.php?framelogin=1&callback=parent.sinaSSOController.feedBackUrlCallBack&sudaref=login.sina.com.cn&retcode=4401&reason=%B1%A7%C7%B8%A3%A1%B5%C7%C2%BC%CA%A7%B0%DC%A3%AC%C7%EB%C9%D4%BA%F2%D4%D9%CA%D4");
</script>
</body>
</html>


里面的retcode=4401好像是登陆失败的意思;

下面附上我登陆请求的一些头和参数:
RequestParams requestParams = new RequestParams();
requestParams.addHeader("Accept",
"text/html, application/xhtml+xml, */*");
requestParams.addHeader("Referer",
"http://login.sina.com.cn/signup/signin.php?entry=weibo");
requestParams.addHeader("Accept-Language", "zh-cn");
requestParams
.addHeader("User-Agent",
"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0");
requestParams.addHeader("Host", "login.sina.com.cn");
requestParams.addHeader("Connection", "Keep-Alive");
requestParams.addHeader("Content-Type",
"application/x-www-form-urlencoded");
requestParams.addHeader("Cache-Control", "no-cache");


requestParams.addQueryStringParameter("encoding", "UTF-8");
requestParams.addQueryStringParameter("entry", "weibo");
requestParams.addQueryStringParameter("from", "");
requestParams.addQueryStringParameter("prelt", "0");
requestParams.addQueryStringParameter("gateway", "1");
requestParams.addQueryStringParameter("nonce", nonce);
requestParams.addQueryStringParameter("pwencode", "rsa2");
requestParams.addQueryStringParameter("returntype", "META");
requestParams.addQueryStringParameter("pagerefer",
"http://weibo.com/a/download");
requestParams.addQueryStringParameter("savestate", "30");
requestParams.addQueryStringParameter("servertime", servertime);
requestParams.addQueryStringParameter("rsakv", rsakv);


requestParams.addQueryStringParameter("service", "miniblog");
requestParams.addQueryStringParameter("sp", getEncryptedP());
requestParams.addQueryStringParameter("su", getEncodedU());
requestParams
.addQueryStringParameter(
"url",
"http://weibo.com/ajaxlogin.php?framelogin=1&callback=parent.sinaSSOController.feedBackUrlCallBack");
requestParams.addQueryStringParameter("useticket", "0");
requestParams.addQueryStringParameter("vsnf", "1");
requestParams.addQueryStringParameter("ssosimplelogin", "1");


if (pcid != null)
requestParams.addQueryStringParameter("pcid", pcid);
if (door != null)
requestParams.addQueryStringParameter("door", door);


请各位帮忙看一下什么原因???
举报
YYP001
发帖于2年前 1回/236阅
顶部