开发者

PHP TwitterOAuth account/verify_credentials returning 401

开发者 https://www.devze.com 2023-01-24 12:09 出处:网络
I\'m usi开发者_如何学运维ng abraham\'s twitter oauth class (https://github.com/abraham/twitteroauth) to connect and update twitter. I had it working during testing but now I\'m trying to put it onto m

I'm usi开发者_如何学运维ng abraham's twitter oauth class (https://github.com/abraham/twitteroauth) to connect and update twitter. I had it working during testing but now I'm trying to put it onto my live server I'm getting a 401 Could Not Authenticate error.

The original connection works ok (200 response) but when I use $connection->get('account/verify_credentials'); it just 401's and says it cannot authenticate.

From looking at the $connection object, the [consumer] callback_url property is blank. Could this be the problem?

Cheers


Apparently I didnt need to be running this unless I've already authenticated once through twitter, for some reason I was trying to run this directly after connecting, obviously there were no auth tokens so it wouldn't authenticate.

Silly me.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号