日期:2014-05-18  浏览次数:20561 次

QQ登陆add_pic_t接口谁有用过吗?
上传一张图片,并发布一条消息到腾讯微博平台上。

API地址

发布普通微博(不带图片)已经成功,但是发布带图片的微博,总是报“签名失败”任务,功能类似的新浪微博已经测试成功,按照同样方式请求腾讯的这个,就失败。

而且返回信息也没有可以参考的baseString和true_sign。。。

特来此求助啊。。下面贴出的是从wireshark导出的排好格式HTTP报文


Hypertext Transfer Protocol
  POST /t/add_pic_t HTTP/1.1\r\n
  Content-Type: multipart/form-data; boundary=---------------------------8ced7f51516fed8\r\n
  Host: openapi.qzone.qq.com\r\n
  Content-Length: 8702\r\n
  Expect: 100-continue\r\n
  Connection: Keep-Alive\r\n
  \r\n
  [Full request URI: http://openapi.qzone.qq.com/t/add_pic_t]
MIME Multipart Media Encapsulation, Type: multipart/form-data, Boundary: "---------------------------8ced7f51516fed8"
  [Type: multipart/form-data]
  Preamble
  First boundary: -----------------------------8ced7f51516fed8\r\n
  Encapsulated multipart part: 
  Content-Disposition: form-data; name="oauth_consumer_key"\r\n\r\n

  我的APPKEY
  Boundary: \r\n-----------------------------8ced7f51516fed8\r\n
  Encapsulated multipart part: 
  Content-Disposition: form-data; name="oauth_nonce"\r\n\r\n

  21536357
  Boundary: \r\n-----------------------------8ced7f51516fed8\r\n
  Encapsulated multipart part: 
  Content-Disposition: form-data; name="oauth_signature_method"\r\n\r\n

  HMAC-SHA1
  Boundary: \r\n-----------------------------8ced7f51516fed8\r\n
  Encapsulated multipart part: 
  Content-Disposition: form-data; name="oauth_timestamp"\r\n\r\n

  1332578912
  Boundary: \r\n-----------------------------8ced7f51516fed8\r\n
  Encapsulated multipart part: 
  Content-Disposition: form-data; name="oauth_token"\r\n\r\n
  Data (20 bytes)

  我的oauth_token
  Boundary: \r\n-----------------------------8ced7f51516fed8\r\n
  Encapsulated multipart part: 
  Content-Disposition: form-data; name="oauth_version"\r\n\r\n

  1.0
  Boundary: \r\n-----------------------------8ced7f51516fed8\r\n
  Encapsulated multipart part: 
  Content-Disposition: form-data; name="oauth_signature"\r\n\r\n

  nB+PdW3TMC2OT80L5/N6Gb67uk4=
  Boundary: \r\n-----------------------------8ced7f51516fed8\r\n
  Encapsulated multipart part: 
  Content-Disposition: form-data; name="content"\r\n\r\n

  123
  Boundary: \r\n-----------------------------8ced7f51516fed8\r\n
  Encapsulated multipart part: 
  Content-Disposition: form-data; name="openid"\r\n\r\n

  EFA33A7A0FEEF2A97CF9A3D57428167F
  Boundary: \r\n-----------------------------8ced7f51516fed8\r\n
  Encapsulated multipart part: (image/jpeg)
  Content-Disposition: form-data; name="pic"; filename="System.Byte[]"\r\n
  Content-Type: image/jpeg\r\n\r\n
  JPEG File Interchange Format
  Last boundary: \r\n-----------------------------8ced7f51516fed8--\r\n


------解决方案--------------------
我也一直想研究这个!!!
------解决方案--------------------
帮你顶下。。。。让更多大牛看到 嘿嘿
------解决方案--------------------
我还真没用过,希望楼主成功。