|
_s.tiebaApi.web.meizhuvd("188577933","meizhi",function(a,b,c,d){console.info(a,b,c,d)})
结果:
Object {action: "vote", no: 230308, error: "forbid", data: Array[0]}
为什么会forbid错误呢?求解求人耐心帮我看看←_←要基友也可以←_←最多350
代码:[javascript]- _s.tiebaApi.web.meizhuvd=function(uid,type,hdd){
- _s.tiebaApi.web.getmeizhi(uid,function(q,n,m){
- if(!q){
- hdd(false,n,m);
- }else{
- var kw= q.forum_name;
- _s.tiebaApi.bar(kw,0,1,function(q){
- if(q==false){
- hdd(false,0,"获得妹吧fid错误");
- }else{
- var fid= q.forum.id;
- _s.tiebaApi.userInfo(0,function(q){
- var tbs= q.anti.tbs;
- _.sendOutserveredHttpWithCookie("BDUSS="+encodeURIComponent(_s.tiebaApi.getBduss())+";","tieba.baidu.com","/encourage/post/meizhi/vote"
- ,"POST","content=&tbs="+encodeURIComponent(tbs)+"&kw="+encodeURIComponent(kw)+"&uid="+encodeURIComponent(uid)+"&scid="+encodeURIComponent(_s.tiebaApi.getUid())
- +"&vtype="+type+"&ie=utf-8&vcode=&new_vcode=1&tag=11&fid="+encodeURIComponent(fid),80,function(q){
- if(ifnoerror(q)){
- hdd(JSON.parse(q.body));
- }else{
- hdd(false,0,"网络错误");
- }
- });
- });
- }
- });
- }
- });
- }
复制代码 sendOutserveredHttpWithCookie就是自定义cookie的跨站ajax。
难道说贴吧网页cookie不能只有BDUSS段?那其他段是干嘛的←_←
如果和cookie没有关系←_←那么为什么会失败啊= =求解 |
|