twitter分享问题(二)—— Unknown error(403)

       看到这个问题是不是有点懵了,好吧,不罗嗦了,解决办法如下:


转自:http://jayrparro.posterous.com/incorrect-signature-sharekittwitter-error
I'm just concerned of sharing the URL to be posted in the user's wall.

Reported the problem/bug here:http://bit.ly/kPSHU1
It's found out that the Twitter oAuth has been updated and breaks in this latest release of ShareKit.

Excerpts from Twitter oAuth docs: "Please use HTTPS for this method, and all other OAuth token negotiation steps."

https://dev.twitter.com/doc/get/oauth/authorize

To fix this issue, we need to change SHKTwitter.m in lines 54-56(解决的办法) from https://twitter.com/ to https://api.twitter.com/ 

self.authorizeURL = [NSURL URLWithString:@"https://api.twitter.com/oauth/authorize"];
 self.requestURL = [NSURL URLWithString:@"https://api.twitter.com/oauth/request_token"]; 
self.accessURL = [NSURL URLWithString:@"https://api.twitter.com/oauth/access_token"];

Then, in sendStatus method update the URL link: 

OAMutableURLRequest *oRequest = [[OAMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"https://api.twitter.com/1/statuses/update.json"] consumer:consumer token:accessToken realm:nil signatureProvider:nil];

This should be fix in the next version of ShareKit. :)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值