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.
精彩评论