Created
November 4, 2011 13:44
-
-
Save basyura/1339348 to your computer and use it in GitHub Desktop.
oauth.vim - failed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let s:consumer_key = 'consumer key' | |
let s:consumer_secret = 'consumer secret' | |
let s:access_token = 'access token' | |
let s:access_token_secret = 'access token secret' | |
let s:ctx = { | |
\ 'consumer_key' : s:consumer_key , | |
\ 'consumer_secret' : s:consumer_secret , | |
\ 'access_token' : s:access_token , | |
\ 'access_token_secret' : s:access_token_secret , | |
\ } | |
echo oauth#get('https://api.twitter.com/1/statuses/home_timeline.xml', s:ctx, {}, {'per_page' : 50}) | |
" {'header': ['HTTP/1.1 401 Unauthorized', 'Date: Fri, 04 Nov 2011 13:41:28 GMT', 'Status: 401 Unauthorized', 'WWW-Authenticate: OAuth realm="https://api.twitter.com"', 'X-Runtime: 0.38868', 'Content-Type: application/xml; charset=utf-8', 'Content-Length: 169', 'Cache-Control: no-cache, max-age=1800', 'Set-Cookie: k=10.35.55.137.1320414087676387; path=/; expires=Fri, 11-Nov-11 13:41:27 GMT; domain=.twitter.com', 'Set-Cookie: guest_id=v1%3A132041408768056612; domain=.twitter.com; path=/; expires=Mon, 04-Nov-2013 01:41:27 GMT', 'Set-Cookie: _twitter_sess=BAh7CDoPY3JlYXRlZF9hdGwrCIIL0G4zAToHaWQiJTUwMGI2NzEzN2M3MTg0%250AZWJiODkyOTc4YzIwMjUyODM2IgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVy%250AOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--db968d45eb9b3e48fdab1d8c69467b9aaf126c90; domain=.twitter.com; path=/; HttpOnly', 'Expires: Fri, 04 Nov 2011 14:11:27 GMT', 'Vary: Accept-Encoding', 'Server: tfe'], 'content': '<?xml version="1.0" encoding="UTF-8"?> | |
"<hash> | |
" <error>Could not authenticate with OAuth.</error> | |
" <request>/1/statuses/home_timeline.xml?per_page=50</request> | |
"</hash> | |
'} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment