# twurl -t -d "screen_name=dwikirowi" "/1/blocks/create.xml"
opening connection to api.twitter.com...
opened
<- "POST /1/blocks/create.xml HTTP/1.1\r\nAccept: */*\r\nConnection:
close\r\nUser-Agent: OAuth gem v0.4.4\r\nContent-Type:
application/x-www-form-urlencoded\r\nAuthorization: OAuth
oauth_consumer_key=\"EK9yzQy6K8gqzAg0pCaQug\",
oauth_nonce=\"TpGOfe8bnzD74N5Ixrpjaip1PfscSkxTYLlYvXqzs14\",
oauth_signature=\"yX1suHCZxeGf3pyjNCdkOE5F7rw%3D\",
oauth_signature_method=\"HMAC-SHA1\", oauth_timestamp=\"1294066225\",
oauth_token=\"7344012-fsOhwagPQXaz627NUEI9jbxUFyF4QBQakZeikJsoIA\",
oauth_version=\"1.0\"\r\nContent-Length: 21\r\nHost:
api.twitter.com\r\n\r\n"
<- "screen_name=dwikirowi"
-> "HTTP/1.1 401 Unauthorized\r\n"
-> "Date: Mon, 03 Jan 2011 14:50:25 GMT\r\n"
-> "Server: hi\r\n"
-> "Status: 401 Unauthorized\r\n"
-> "WWW-Authenticate: Basic realm=\"Twitter API\"\r\n"
-> "Content-Type: application/xml; charset=utf-8\r\n"
-> "Content-Length: 147\r\n"
-> "Cache-Control: no-cache, max-age=1800\r\n"
-> "Set-Cookie: k=99.174.173.56.1294066225492468; path=/; expires=Mon,
10-Jan-11 14:50:25 GMT; domain=.twitter.com\r\n"
-> "Set-Cookie: guest_id=129406622564378748; path=/; expires=Wed, 02
Feb 2011 14:50:25 GMT\r\n"
-> "Set-Cookie:
_twitter_sess=BAh7CDoHaWQiJTc1YmY4YzA2YTZiNmE1MWIzZjI5N2M2NmQ4MjEyODE4Igpm%250AbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAG%250AOgpAdXNlZHsAOg9jcmVhdGVkX2F0bCsI95FbTC0B--0032072eac8637c5b993db5512109cee00605655;
domain=.twitter.com; path=/\r\n"
-> "Expires: Mon, 03 Jan 2011 15:20:25 GMT\r\n"
-> "Vary: Accept-Encoding\r\n"
-> "Connection: close\r\n"
-> "\r\n"
reading 147 bytes...
-> ""
-> "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<hash>\n
<request>/1/blocks/create.xml</request>\n <error>Read-only
application cannot POST</error>\n</hash>\n"
read 147 bytes
Conn close
<?xml version="1.0" encoding="UTF-8"?>
<hash>
<request>/1/blocks/create.xml</request>
<error>Read-only application cannot POST</error>
</hash>
Tom
--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: http://groups.google.com/group/twitter-development-talk
My app is Read & Write and has been Read & Write since day 1 since
pretty much everything it does was obviously going to require 'write'
access.
When I pull up my app on the dev page it is shown as being Read & Write.
I read somewhere else that someone else had this problem & so they
deleted their app and re-created it. I've tried that for two days now,
but whenever I try to delete it, I get the "twitter is over capacity"
message.
Still need ideas.
TjL
Except that they aren't. I never have read-only tokens or application.
So it's "obviously" a problem with Twitter.
Remember when twurl was going to be as easy as curl? Yeah. Me too. What a crock.
TjL
Why is the 'delete' button still shown if you know it isn't working?
> Regarding your application. Can you check under:
> http://dev.twitter.com/apps
> That your application is read and write. The error message is very specific
> and is only triggered by an application which is read only. If it is read
> and write, try changing it to read only and then back again.
It was set to read & write, as previously stated, but since you don't
believe me, here's a screenshot:
https://img.skitch.com/20110105-e7439ygif6i6yiiwuir244itnp.jpg
I did as you suggested, toggling the app to read only, (and then saved
& saw it listed as read only), and then changed it back to read&write,
as shown here:
https://img.skitch.com/20110105-urh375rhp1bfmgu463pbtwc3b.jpg
Then re-authorized (which I'll now have to do on 4 different computers
since the keys changed):
# twurl authorize --consumer-key 6meHNyaircETFgqObTAkQ
--consumer-secret qqKvuCRyNBGrYMPQIUyhZiOU8sLdlKS9Mo7Edx70Uk
and then pasted the PIN from my web browser. It said it authorized.
I tried my script again:
# twit.sh --block @dwikirowi
failed, as did
# twurl -d "screen_name=dwikirowi" "/1/blocks/create.xml"
<?xml version="1.0" encoding="UTF-8"?>
<hash>
<request>/1/blocks/create.xml</request>
<error>Read-only application cannot POST</error>
</hash>
Actually, now that I think about it… isn't that suggesting that
*twurl* is Read-Only, not my app? I don't know. All I know is that we
never had these problems with curl and I've wasted far too long on
this when I could have been actually improving my program :-/
Would xAuth make this any easier?
TjL
Actually, now that I think about it… isn't that suggesting that *twurl* is Read-Only, not my app?
TjL
Can I get that coffee via PayPal?
https://img.skitch.com/20110105-mr9ydhi9uh6yr2e6mkpjy26gaq.jpg
Again, the app has NEVER BEEN Read Only, so the app could never have
requested Read Only access to my account.
>> Actually, now that I think about it… isn't that suggesting that *twurl* is
>> Read-Only, not my app?
>
> No. It Twurl is just acting like a library that is using your applications
> consumer key and secret. (Which you should reset if those are you real
> values in the emails).
Will do.
I appreciate folks willingness to help, but so far everything has
resolved around the idea that I must be wrong about the app being
"read only." I don't know how else to prove that it isn't now and it
never was.
TjL
TjL