[twitter-dev] Re: Send Cyrillic character (OAuth)
Yes, I saw method strEscape. It's method not work for cyrillic symbols. Bug I saw too :) Thank you for link - http://www.google.com/url?sa=Dq=http://blog.dborisenko.com/en/2009/09/05/extended-utf-8-in-oauth-actionscript-library/usg=AFQjCNFKXX8jSTvq-3dZ0UoGqLfX64ZBPQ I will try to apply it. Thank you. -- yury | fedorchenko Z-13 www.z-13.ru
Re: [twitter-dev] Re: Send Cyrillic character (OAuth)
Hi Z-13, It's a Ruby on Rails application, though it doesn't require too much familiarity with Ruby on Rails to get up and running with it. On a Mac or Linux environment, it should be as easy as git cloning the repository ( http://learn.github.com/p/intro.html ) then trying to start the server from within the directory that unpacks with script/server -- if that command succeeds, you then point your web browser to http://localhost:3000 If it doesn't succeed, then you may need to install some dependencies. Sqlite3 is required along with Ruby 1.8.6 and Rubygems. Almost all other dependencies should be included with the archive, though if you install rails with Rubygems it will ensure that you have any missing dependencies. Taylor Singletary Developer Advocate, Twitter http://twitter.com/episod On Sun, May 9, 2010 at 10:47 AM, Z-13 y...@yandex.ru wrote: How use your OAuth Dancer tool? Thank you.
Re: [twitter-dev] Re: Send Cyrillic character (OAuth)
Z-13, Don't forget to do rake db:migrate to build the tables in Sqlite. Agile Web Development with Rails has the skinny to install rails for Mac, Linux, or Windows, if you need more solid material. On Mon, May 10, 2010 at 8:23 PM, Taylor Singletary taylorsinglet...@twitter.com wrote: Hi Z-13, It's a Ruby on Rails application, though it doesn't require too much familiarity with Ruby on Rails to get up and running with it. On a Mac or Linux environment, it should be as easy as git cloning the repository ( http://learn.github.com/p/intro.html ) then trying to start the server from within the directory that unpacks with script/server -- if that command succeeds, you then point your web browser to http://localhost:3000 If it doesn't succeed, then you may need to install some dependencies. Sqlite3 is required along with Ruby 1.8.6 and Rubygems. Almost all other dependencies should be included with the archive, though if you install rails with Rubygems it will ensure that you have any missing dependencies. Taylor Singletary Developer Advocate, Twitter http://twitter.com/episod On Sun, May 9, 2010 at 10:47 AM, Z-13 y...@yandex.ru wrote: How use your OAuth Dancer tool? Thank you.
[twitter-dev] Re: Send Cyrillic character (OAuth)
How does this relate to AIR 1.5 and ActionScript 3?
Re: [twitter-dev] Re: Send Cyrillic character (OAuth)
How does it relate? You are trying to get your AIR/Actionscript code to generate proper OAuth signatures that Twitter will understand. Instead of just writing code and trying against Twitter to see if it works, you can instead speed up the process by starting with a vector that is known to produce valid signatures -- which the oauth-dancer does, with the added benefit of heaps of debugging information. In this way, you would use the OAuth Dancer to attempt to make a resource request or perform a step of the OAuth Dance, after entering in your credentials. You will then see how every parameter got used in the request, the signature base string generated, and the signatures and authorization headers yielded by that process. Then you do a bit of behavior-driven or test-driven development in your AIR/Actionscript code, using exactly the same parameters that produced a valid signature in the oauth-dancer, and keep iterating until you can generate exactly the same signature base strings and signatures. Then you'll move on to actually attempting to make calls against Twitter. It's one tool, among many, that can help you create a golden example to work towards, giving you a clearer path to knowing when your own code is doing the right thing. Taylor Singletary Developer Advocate, Twitter http://twitter.com/episod On Mon, May 10, 2010 at 11:54 AM, Z-13 y...@yandex.ru wrote: How does this relate to AIR 1.5 and ActionScript 3?
[twitter-dev] Re: Send Cyrillic character (OAuth)
Ok. But, I don't know how work with this!
[twitter-dev] Re: Send Cyrillic character (OAuth)
I found solution!! Here it is: private function encodez(str:String):String { return escape(unescape(encodeURIComponent(str))).replace(/%7E/g, '~').replace(/@/g, '%40').replace(/\*/g, '%2A').replace(/\+/g, '%2B').replace(/\//g, '%2F'); } This is poblema with Cyrillic characters and UTF8 encoding.
[twitter-dev] Re: Send Cyrillic character (OAuth)
Thank you for this method - http://destroytoday.com/blog/2010/02/encoding-for-oauth-using-as3/
[twitter-dev] Re: Send Cyrillic character (OAuth)
Hi Z-13, Short Answer: This looks like a bug in Tweetr [5]. Long Answer: I'm not familiar with Tweetr, and my Action Script is a bit rusty, but I took a look at the source of the updateStatus method [1]. It looks like the code calls strEscape [2] (also defined in that file [3]), which takes care of some common problems. What it does not do is encode the string as UTF-8. It looks like some special handling is needed in Action Script [4]. There is already a bug opened again Tweetr for this [5]. Thanks; — Matt Footnote Sanford / @mzsanford Twitter International [1] - http://svn.swfjunkie.com/websvn/filedetails.php?repname=Tweetrpath=%2Ftrunk%2Fsrc%2Fcom%2Fswfjunkie%2Ftweetr%2FTweetr.as [2] Calling code: vars.status = strEscape(status.substr(0,140)); [3] strEscape: private function strEscape(value:String):String { if (_oAuth) { var str:String = escape(value); str = str.replace(/\//g, %2F); str = str.replace(/\*/g, %2A); str = str.replace(/\+/g, %2B); str = str.replace(/@/g, %40); return str; } return value; } [4] - http://blog.dborisenko.com/en/2009/09/05/extended-utf-8-in-oauth-actionscript-library/ [5] - http://bugs.swfjunkie.com/task/30?project=3status%5B0%5D=open On May 10, 11:54 am, Z-13 y...@yandex.ru wrote: How does this relate to AIR 1.5 and ActionScript 3?
[twitter-dev] Re: Send Cyrillic character (OAuth)
How use your OAuth Dancer tool? Thank you.
Re: [twitter-dev] Re: Send Cyrillic character (OAuth)
Hi Patrick, The entry point to the app is in HomeController#index -- but there's not much interesting stuff there. The most interesting parts of OAuth are handled in both the service_provider.rb model, the TheDanceController for the various OAuth steps, and then the api_request.rb model for the individual API requests. The tool relies on the OAuth ruby gem to do much of the work, but a number of methods throughout the gem are overridden to provide extra debugging information and additional options in the included oauth_ghostbuster plugin you'll find in the vendor directory. Taylor Singletary Developer Advocate, Twitter http://twitter.com/episod On Sat, Mar 20, 2010 at 10:32 PM, Patrick Kennedy kenned...@gmail.comwrote: I'm new to Rails, and I am in process of studying this oauth example. Since there is no index file entry point at /public, where is the entry point of your oauth-dancer app? This is a newbie question of Rails, but it looks like a fun app for the oauth dancing purposes, and I wanted to follow the logic. Thanks. Pat On Thu, Mar 18, 2010 at 10:02 PM, Taylor Singletary taylorsinglet...@twitter.com wrote: Hi Z-13, Using my OAuth Dancer tool ( http://bit.ly/oauth-dancer ), it's fairly easy to setup a test scenario where you're posting a status with Cyrillic characters, as long as you're using the UTF-8 representation. While I don't know what specific code you'll need to write for Adobe AIR, through the OAuth and HTTP request cycle, this is how it's represented: Full Request URI http://api.twitter.com/1/statuses/update.xml HTTP Method post Request Body status=тест+on+behalf+of+another Content-Type application/x-www-form-urlencoded Headers Content-Type: application/x-www-form-urlencoded The OAuth Dance Signature Base String POSThttp%3A%2F%2Fapi.twitter.com %2F1%2Fstatuses%2Fupdate.xmloauth_consumer_key%3Dri8JxYK2ddwSV5xIUfNNvQ%26oauth_nonce%3Dn4uOLc7RCCf3PtKeEPpBiV1EdRXLyFAM72Q60J80w8s%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1268924223%26oauth_token%3D119476949-gF0B5O1Wwa2UqqIwopAhQtQVTzmfSIOSiHQS7Vf8%26oauth_version%3D1.0%26status%3D%25D1%2582%25D0%25B5%25D1%2581%25D1%2582%2520on%2520behalf%2520of%2520another Signature 6FcKffKploa26usTJuoADrtqp9Y= Authorization Header OAuth oauth_nonce=n4uOLc7RCCf3PtKeEPpBiV1EdRXLyFAM72Q60J80w8s, oauth_signature_method=HMAC-SHA1, oauth_timestamp=1268924223, oauth_consumer_key=ri8JxYK2ddwSV5xIUfNNvQ, oauth_token=119476949-gF0B5O1Wwa2UqqIwopAhQtQVTzmfSIOSiHQS7Vf8, oauth_signature=6FcKffKploa26usTJuoADrtqp9Y%3D, oauth_version=1.0 Notice the encoding on the signature base string. Here's the response you get back for a successful POST, which includes the special characters as UTF-8 entities: ?xml version=1.0 encoding=UTF-8? status created_atThu Mar 18 14:57:04 + 2010/created_at id10674682220/id text#1090;#1077;#1089;#1090; on behalf of another/text sourcelt;a href=quot;http://realitytechnicians.comquot; rel=quot;nofollowquot;gt;Crying Indianlt;/agt;/source truncatedfalse/truncated in_reply_to_status_id/in_reply_to_status_id in_reply_to_user_id/in_reply_to_user_id favoritedfalse/favorited in_reply_to_screen_name/in_reply_to_screen_name user id119476949/id nameOAuth Dancer/name screen_nameoauth_dancer/screen_name locationSan Francisco, CA/location description/description profile_image_url http://a3.twimg.com/profile_images/730275945/oauth-dancer_normal.jpg /profile_image_url urlhttp://bit.ly/oauth-dancer/url protectedfalse/protected followers_count9/followers_count profile_background_colorC0DEED/profile_background_color profile_text_color33/profile_text_color profile_link_color0084B4/profile_link_color profile_sidebar_fill_colorDDEEF6/profile_sidebar_fill_color profile_sidebar_border_colorC0DEED/profile_sidebar_border_color friends_count11/friends_count created_atWed Mar 03 19:37:35 + 2010/created_at favourites_count0/favourites_count utc_offset/utc_offset time_zone/time_zone profile_background_image_url http://a3.twimg.com/profile_background_images/80151733/oauth-dance.png /profile_background_image_url profile_background_tiletrue/profile_background_tile notificationsfalse/notifications geo_enabledfalse/geo_enabled verifiedfalse/verified followingfalse/following statuses_count17/statuses_count langen/lang contributors_enabledfalse/contributors_enabled /user geo/ coordinates/ place/ contributors/ /status Hope this helps you. Taylor Singletary Developer Advocate, Twitter http://twitter.com/episod On Thu, Mar 18, 2010 at 3:38 AM, Z-13 y...@yandex.ru wrote: Who can help me? To unsubscribe from this group, send email to twitter-development-talk+ unsubscribegooglegroups.com
Re: [twitter-dev] Re: Send Cyrillic character (OAuth)
I'm new to Rails, and I am in process of studying this oauth example. Since there is no index file entry point at /public, where is the entry point of your oauth-dancer app? This is a newbie question of Rails, but it looks like a fun app for the oauth dancing purposes, and I wanted to follow the logic. Thanks. Pat On Thu, Mar 18, 2010 at 10:02 PM, Taylor Singletary taylorsinglet...@twitter.com wrote: Hi Z-13, Using my OAuth Dancer tool ( http://bit.ly/oauth-dancer ), it's fairly easy to setup a test scenario where you're posting a status with Cyrillic characters, as long as you're using the UTF-8 representation. While I don't know what specific code you'll need to write for Adobe AIR, through the OAuth and HTTP request cycle, this is how it's represented: Full Request URI http://api.twitter.com/1/statuses/update.xml HTTP Method post Request Body status=тест+on+behalf+of+another Content-Type application/x-www-form-urlencoded Headers Content-Type: application/x-www-form-urlencoded The OAuth Dance Signature Base String POSThttp%3A%2F%2Fapi.twitter.com%2F1%2Fstatuses%2Fupdate.xmloauth_consumer_key%3Dri8JxYK2ddwSV5xIUfNNvQ%26oauth_nonce%3Dn4uOLc7RCCf3PtKeEPpBiV1EdRXLyFAM72Q60J80w8s%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1268924223%26oauth_token%3D119476949-gF0B5O1Wwa2UqqIwopAhQtQVTzmfSIOSiHQS7Vf8%26oauth_version%3D1.0%26status%3D%25D1%2582%25D0%25B5%25D1%2581%25D1%2582%2520on%2520behalf%2520of%2520another Signature 6FcKffKploa26usTJuoADrtqp9Y= Authorization Header OAuth oauth_nonce=n4uOLc7RCCf3PtKeEPpBiV1EdRXLyFAM72Q60J80w8s, oauth_signature_method=HMAC-SHA1, oauth_timestamp=1268924223, oauth_consumer_key=ri8JxYK2ddwSV5xIUfNNvQ, oauth_token=119476949-gF0B5O1Wwa2UqqIwopAhQtQVTzmfSIOSiHQS7Vf8, oauth_signature=6FcKffKploa26usTJuoADrtqp9Y%3D, oauth_version=1.0 Notice the encoding on the signature base string. Here's the response you get back for a successful POST, which includes the special characters as UTF-8 entities: ?xml version=1.0 encoding=UTF-8? status created_atThu Mar 18 14:57:04 + 2010/created_at id10674682220/id text#1090;#1077;#1089;#1090; on behalf of another/text sourcelt;a href=quot;http://realitytechnicians.comquot; rel=quot;nofollowquot;gt;Crying Indianlt;/agt;/source truncatedfalse/truncated in_reply_to_status_id/in_reply_to_status_id in_reply_to_user_id/in_reply_to_user_id favoritedfalse/favorited in_reply_to_screen_name/in_reply_to_screen_name user id119476949/id nameOAuth Dancer/name screen_nameoauth_dancer/screen_name locationSan Francisco, CA/location description/description profile_image_urlhttp://a3.twimg.com/profile_images/730275945/oauth-dancer_normal.jpg/profile_image_url urlhttp://bit.ly/oauth-dancer/url protectedfalse/protected followers_count9/followers_count profile_background_colorC0DEED/profile_background_color profile_text_color33/profile_text_color profile_link_color0084B4/profile_link_color profile_sidebar_fill_colorDDEEF6/profile_sidebar_fill_color profile_sidebar_border_colorC0DEED/profile_sidebar_border_color friends_count11/friends_count created_atWed Mar 03 19:37:35 + 2010/created_at favourites_count0/favourites_count utc_offset/utc_offset time_zone/time_zone profile_background_image_urlhttp://a3.twimg.com/profile_background_images/80151733/oauth-dance.png/profile_background_image_url profile_background_tiletrue/profile_background_tile notificationsfalse/notifications geo_enabledfalse/geo_enabled verifiedfalse/verified followingfalse/following statuses_count17/statuses_count langen/lang contributors_enabledfalse/contributors_enabled /user geo/ coordinates/ place/ contributors/ /status Hope this helps you. Taylor Singletary Developer Advocate, Twitter http://twitter.com/episod On Thu, Mar 18, 2010 at 3:38 AM, Z-13 y...@yandex.ru wrote: Who can help me? To unsubscribe from this group, send email to twitter-development-talk+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
[twitter-dev] Re: Send Cyrillic character (OAuth)
Who can help me?