Re: [twitter-dev] Json parse error / escape problem
This is the exact problem I reported a few days back. According to this discussionhttp://stackoverflow.com/questions/583562/json-character-encodingof the JSON spec, when encoding strings inside JSON: All Unicode characters may be placed within the quotation marks except for the characters that must be escaped: quotation mark, reverse solidus, and the control characters (U+ through U+001F) If I understand that correctly Twitter API might be encoding the strings wrong. I worked around this hiccup by modifying my parser. On Fri, Oct 29, 2010 at 7:12 PM, Morris Li morris...@gmail.com wrote: Hi i have got an issue with my PHP version while developing the tweeter application. Our company setting at the moment is: php 5.1.2 the json_decode function is from 5.2+. So when I try to tweet a message to twitter it throws 'Illegal escape sequence 'u''. Can anyone would like to help? Below is the issue that I have got: -- Harshad RJ http://twitter.com/h__r__j -- 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
[twitter-dev] Re: TwitterOAuth example gets 401 all the time
On 1 nov, 06:45, Abraham Williams 4bra...@gmail.com wrote: Check to make sure the clock on the server/computer is correct. If it is off by more then five minutes this is likely the problem. It can't be Abraham. It's synchronized with NTP so it should be perfect. I'm puzzled at this. Any other hint would be appreciated. Thanks for your help anyway Abraham. -- 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
[twitter-dev] Broken Avatars
My cronjobs are picking up profiles with broken avatars. Mostly these appear to be 403s from Amazon S3. (guessing ACL problem) - Also some profile pic URLs don't appear to have file extension. Here's a list of user IDs affected 16043513 16750098 31585899 42854554 112564807 21895964 40581702 20228830 76548787 7754142 2365621 191095589 116205286 194025160 85801804 100892581 121435564 40957199 138852644 15112697 100507581 15137209 150515107 34507533 194208312 183513992 196037820 185650485 190402611 20758496 57700410 93878012 185187887 150781581 101030129 112813599 120923232 20240291 179635513 129470065 110558062 50013082 182768288 54011263 123070813 186379034 189829951 15073615 15139701 64369909 190161770 151090448 163978408 39029651 23770408 17073028 101663482 41266471 26522074 18327181 169540092 173109002 19588191 123332914 14583298 127887497 21807338 174213835 128829875 178235982 59447408 15139632 112043276 15139358 29285835 10812932 128153098 103239661 137938401 165341175 93499379 142264591 65870543 125061952 85181985 140008847 112780190 131795738 120391955 174539966 101514239 129964162 97146535 122779494 120670217 123531432 150956370 172256595 166610032 174349689 157614647 145599105 156211148 180132185 174544230 118345431 101715840 168934188 102699979 161394206 152234349 185058228 18643276 125985442 100798835 175650187 109440999 182084615 102331487 182710926 99398638 139014613 116595283 171108486 145682502 123151003 137899129 128208747 145962776 145467001 166421666 122848756 166136679 100348568 94204076 119599518 172522970 21721609 133239258 132677048 19212129 152263249 38331665 147316393 161278271 122415870 167451222 77212419 142205925 17532187 70596046 134363969 181652928 123355584 158196193 149049797 99497731 108885760 150277054 17020800 102614484 109490817 166414116 177164435 76052140 58123971 162694988 155212455 109836626 129644722 97837669 138024486 113686401 165330545 183247611 160171267 108944130 109564360 168115825 151662031 151425020 121467109 9416242 142311195 186387668 57287018 205365122 186811184 181968664 100207706 175658337 168408211 101276261 159007861 78243786 105304570 156829819 130359175 143736549 124304349 99420072 188117602 92299633 155006719 115994515 151704431 175653189 105422394 92577027 151662851 23461101 137188240 29228304 -- 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
[twitter-dev] Clarification on automated replies when solicited by the user
I run a twitter account that posts deals for video games. Our followers often tweet us asking for the best price a game is available for, and we've found a way to automatically recognise when we're asking us for a price, to fetch that low price from our servers, and send it to the user along with a link to our website. (That link provides the user with more information about the game, as well as prices from other retailers.) A typical exchange would be like this: User: @ouraccount hi, can you find me the cheapest price for halo reach? Us: @theiraccount Halo Reach (360) is available for $39.99 from GameStop link to our site As far as I can tell from the twitter automation rules, this is acceptable automation because: 1) It's solicited by the user, we only reply to that one user when they specifically ask us for a price. 2) We're providing a link to an information page about the game on our web site, not an affiliate link. That said, we want to make 100% sure that we're not breaking any rules by doing this. Any feedback would be much appreciated. :-) -- 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
[twitter-dev] twivatar points to GoDaddy.com Why?
I have been using http://twivatar.org/[screen_name]/[size]; to load twitter user's avatar. I just noticed something today. Does Twitter Avatar @ http://twivatar.org/[screen_name]/[size] get hijack by GoDaddy.com website or the API URL address has changed. It was working yesterday. What is going on here? Does anyone know about this? -- 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
[twitter-dev] Hi
Hi there, Forgive me for intruding on this space. :) But.. I'm looking for a very specific answer on Twitter API - as I help someone integrate Twitter on to their mobile apps. My question is: What is the exact query(syntax) to find the NEAREST 5 Tweets, given the longitude and latitude or a location ?? Any one out there can help me, and I'd Deeply Appreciate it. THANKS in advance! Peace Dinesh -- 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
Re: [twitter-dev] twivatar points to GoDaddy.com Why?
Either their domain has expired or they've sold it to sedoparking. Either way, look at implementing your own avatar cache. On 31 Oct 2010, at 11:32, wannagoogle wrote: I have been using http://twivatar.org/[screen_name]/[size]; to load twitter user's avatar. I just noticed something today. Does Twitter Avatar @ http://twivatar.org/[screen_name]/[size] get hijack by GoDaddy.com website or the API URL address has changed. It was working yesterday. What is going on here? Does anyone know about this? -- 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
Re: [twitter-dev] Clarification on automated replies when solicited by the user
Hi Shaolyen, Your logic here appears wise and within the rules for @mentions. I would recommend strongly encouraging users who want to interact with this bot to follow the account. Establishing a follow relationship strengthens the bond from an algorithmic perspective, but shouldn't be absolutely necessary since the user initiates the conversation by messaging your account rather than the other way around. Taylor On Sat, Oct 30, 2010 at 6:36 PM, Shaolyen shaol...@gmail.com wrote: I run a twitter account that posts deals for video games. Our followers often tweet us asking for the best price a game is available for, and we've found a way to automatically recognise when we're asking us for a price, to fetch that low price from our servers, and send it to the user along with a link to our website. (That link provides the user with more information about the game, as well as prices from other retailers.) A typical exchange would be like this: User: @ouraccount hi, can you find me the cheapest price for halo reach? Us: @theiraccount Halo Reach (360) is available for $39.99 from GameStop link to our site As far as I can tell from the twitter automation rules, this is acceptable automation because: 1) It's solicited by the user, we only reply to that one user when they specifically ask us for a price. 2) We're providing a link to an information page about the game on our web site, not an affiliate link. That said, we want to make 100% sure that we're not breaking any rules by doing this. Any feedback would be much appreciated. :-) -- 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 -- 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
Re: [twitter-dev] Hi
Tweets are very much time-bound, especially when using a location. You'd have to select a certain time limit, like one hour. You would then get all tweets within 2000 meters (for example) of the location, for that one hour. Loop through the tweets and select the nearest five. If there are too many results for the 2000 meters, you could lower it to 200 meters, although that would give less results for lower populated areas. Tom On 11/1/10 12:00 AM, Ascended Master Dinesh wrote: Hi there, Forgive me for intruding on this space. :) But.. I'm looking for a very specific answer on Twitter API - as I help someone integrate Twitter on to their mobile apps. My question is: What is the exact query(syntax) to find the NEAREST 5 Tweets, given the longitude and latitude or a location ?? Any one out there can help me, and I'd Deeply Appreciate it. THANKS in advance! Peace Dinesh -- 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
[twitter-dev] Twitter stopped working
At the top of my page I have include 'lib/EpiCurl.php'; include 'lib/EpiOAuth.php'; include 'lib/EpiTwitter.php'; include 'lib/secret.php'; My code for sending to twitter is $twitter_message = Offers update - . date(g:i a:) . http://www.pub-rooms.co.uk/ask-rooms.php?bookrooms=; . $intid . - . $ItemName . . $CTown; $twitterObj = new EpiTwitter($consumer_key, $consumer_secret, $oauth_token, $oauth_token_secret); $twitter_message = utf8_encode($twitter_message); $x = $twitterObj-post_statusesUpdate(array('status' = $twitter_message)); print_r($twitterObj-post_statusesUpdate(array('status' = $twitter_message))); if ($x-id) { } else { echo Error Posting Tweet\n; die(); } Instead of posting to twitter I get Error Posting Tweet being echoed print_r($twitterObj-post_statusesUpdate(array('status' = $twitter_message))); returns EpiTwitterJson Object ( [resp:private] = EpiCurlManager Object ( [key:private] = Resource id #20 [epiCurl:private] = EpiCurl Object ( [mc:private] = Resource id #18 [msgs:private] = [running:private] = [requests:private] = Array ( [Resource id #19] = Resource id #19 [Resource id #20] = Resource id #20 ) [responses:private] = Array ( ) [properties:private] = Array ( [code] = 2097154 [time] = 3145731 [length] = 3145743 [type] = 1048594 ) ) ) ) from phpinfo() I get PHP Version 5.2.14 System Linux mail.hificollective.co.uk 2.6.18-194.8.1.el5 #1 SMP Thu Jul 1 19:04:48 EDT 2010 x86_64 Build Date Aug 12 2010 16:04:36 Configure Command './configure' '--build=x86_64-redhat-linux-gnu' '-- host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '-- program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/ bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/ libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/ usr/share/man' '--infodir=/usr/share/info' '--cache-file=../ config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '-- with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/ bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/ usr' '--enable-gd-native-ttf' '--with-t1lib=/usr' '--without-gdbm' '-- with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '-- with-openssl' '--with-pcre-regex' '--with-zlib' '--with-layout=GNU' '-- enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with- kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable- calendar' '--without-mime-magic' '--without-sqlite' '--with-libxml- dir=/usr' '--with-xml' '--with-system-tzdata' '--with-apxs2=/usr/sbin/ apxs' '--without-mysql' '--without-gd' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable- xmlwriter' '--disable-json' '--without-pspell' '--disable-wddx' '-- without-curl' '--disable-posix' '--disable-sysvmsg' '--disable- sysvshm' '--disable-sysvsem' It used to work adn I ahve no idea why it has now stopped so can someone please point me in the right direction - thanks -- 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
Re: [twitter-dev] Twitter stopped working
I would recommend strengthening your error handling code here so that you are able to pivot and debug on the particular error occurring. If you sweep all possible errors under a single rug, you lose visibility on the actual reason for the error. While not every Twitter API error message is helpful, they all provide a clue on what might be going wrong. Has anything else about your environment changed? Is the system clock on the machine executing this out of sync with the times on our servers? If you run the same code from another location, do you still have the same problem? Are there any issues with the account or application you are using to post with? (suspended, etc.) Taylor On Mon, Nov 1, 2010 at 9:21 AM, plw i...@knutsford-software.co.uk wrote: At the top of my page I have include 'lib/EpiCurl.php'; include 'lib/EpiOAuth.php'; include 'lib/EpiTwitter.php'; include 'lib/secret.php'; My code for sending to twitter is $twitter_message = Offers update - . date(g:i a:) . http://www.pub-rooms.co.uk/ask-rooms.php?bookrooms=; . $intid . - . $ItemName . . $CTown; $twitterObj = new EpiTwitter($consumer_key, $consumer_secret, $oauth_token, $oauth_token_secret); $twitter_message = utf8_encode($twitter_message); $x = $twitterObj-post_statusesUpdate(array('status' = $twitter_message)); print_r($twitterObj-post_statusesUpdate(array('status' = $twitter_message))); if ($x-id) { } else { echo Error Posting Tweet\n; die(); } Instead of posting to twitter I get Error Posting Tweet being echoed print_r($twitterObj-post_statusesUpdate(array('status' = $twitter_message))); returns EpiTwitterJson Object ( [resp:private] = EpiCurlManager Object ( [key:private] = Resource id #20 [epiCurl:private] = EpiCurl Object ( [mc:private] = Resource id #18 [msgs:private] = [running:private] = [requests:private] = Array ( [Resource id #19] = Resource id #19 [Resource id #20] = Resource id #20 ) [responses:private] = Array ( ) [properties:private] = Array ( [code] = 2097154 [time] = 3145731 [length] = 3145743 [type] = 1048594 ) ) ) ) from phpinfo() I get PHP Version 5.2.14 System Linux mail.hificollective.co.uk 2.6.18-194.8.1.el5 #1 SMP Thu Jul 1 19:04:48 EDT 2010 x86_64 Build Date Aug 12 2010 16:04:36 Configure Command './configure' '--build=x86_64-redhat-linux-gnu' '-- host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '-- program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/ bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/ libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/ usr/share/man' '--infodir=/usr/share/info' '--cache-file=../ config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '-- with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/ bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/ usr' '--enable-gd-native-ttf' '--with-t1lib=/usr' '--without-gdbm' '-- with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '-- with-openssl' '--with-pcre-regex' '--with-zlib' '--with-layout=GNU' '-- enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with- kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable- calendar' '--without-mime-magic' '--without-sqlite' '--with-libxml- dir=/usr' '--with-xml' '--with-system-tzdata' '--with-apxs2=/usr/sbin/ apxs' '--without-mysql' '--without-gd' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable- xmlwriter' '--disable-json' '--without-pspell' '--disable-wddx' '-- without-curl' '--disable-posix' '--disable-sysvmsg' '--disable- sysvshm' '--disable-sysvsem' It used to work adn I ahve no idea why it has now stopped so can someone please point me in the right direction - thanks -- 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 -- 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
Re: [twitter-dev] Twitter stopped working
It used to work adn I ahve no idea why it has now stopped so can someone please point me in the right direction - thanks DST (Daylight saving time) ended in some regions. As Taylor recommended, check your system clock. -- 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
Re: [twitter-dev] Twitter stopped working
- Original Message - From: CWorster cwors...@schlimmer.com To: twitter-development-talk@googlegroups.com Sent: Monday, November 01, 2010 4:55 PM Subject: Re: [twitter-dev] Twitter stopped working It used to work adn I ahve no idea why it has now stopped so can someone please point me in the right direction - thanks DST (Daylight saving time) ended in some regions. As Taylor recommended, check your system clock. It stopped before the end of last week but it might be the clock as It was wrong before. I will get it checked - thanks Pam -- 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
Re: [twitter-dev] Twitter stopped working
- Original Message - From: Taylor Singletary To: twitter-development-talk@googlegroups.com Sent: Monday, November 01, 2010 4:40 PM Subject: Re: [twitter-dev] Twitter stopped working I would recommend strengthening your error handling code here so that you are able to pivot and debug on the particular error occurring. If you sweep all possible errors under a single rug, you lose visibility on the actual reason for the error. While not every Twitter API error message is helpful, they all provide a clue on what might be going wrong. Has anything else about your environment changed? Is the system clock on the machine executing this out of sync with the times on our servers? If you run the same code from another location, do you still have the same problem? Are there any issues with the account or application you are using to post with? (suspended, etc.) Taylor How can I get more error information from twitter ? Thanks Pam -- 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
[twitter-dev] Javascript, Snowflake, and Direct Message id's
Hello all, I have an non-browser xAuth client written in Javascript. I am in the process of changing up the codebase to use id_str in anticipation of Snowflake. One popular design decision we have made is to interleave sent and received direct messages into one unified list. Currently, we sort by message ID to figure out which message comes before the other. Since JS cannot parse the new 64bit integers, we can no longer do this. The only way I see to do this under Snowflake is to sort based on created_at, is that a valid approach? Is there a better way to approach this problem? Thank you, Jim Cortez -- 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
Re: [twitter-dev] Javascript, Snowflake, and Direct Message id's
I have learned that I can safely compare 2 long integer strings without any problem. Is comparing Snowflake direct message id's in the manner described safe? Jim On 11/1/10 11:29 AM, Jim Cortez wrote: Hello all, I have an non-browser xAuth client written in Javascript. I am in the process of changing up the codebase to use id_str in anticipation of Snowflake. One popular design decision we have made is to interleave sent and received direct messages into one unified list. Currently, we sort by message ID to figure out which message comes before the other. Since JS cannot parse the new 64bit integers, we can no longer do this. The only way I see to do this under Snowflake is to sort based on created_at, is that a valid approach? Is there a better way to approach this problem? Thank you, Jim Cortez -- 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
[twitter-dev] XAuth authentication fail on Chinese machine
Hi, We have created a Desktop Twitter application, In this application I have used XAuth feature to get data from Twitter API. It works fine on Win 7 Ultimate machine. However when I run my application's exe on core Chinese Win 7 machine, I got The remote server returned an error: (401) Unauthorized. error from following request: https://api.twitter.com/oauth/access_token?oauth_consumer_key=oauth_nonce=9644877oauth_signature_method=HMAC-SHA1oauth_timestamp=1288573328oauth_version=1.0x_auth_mode=client_authx_auth_password=XXx_auth_username=oauth_signature=XXX Can anyone help me out to know how to resolve this issue. Thanks, Pawan -- 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
Re: [twitter-dev] Javascript, Snowflake, and Direct Message id's
Yes, and no. Javascript has problems using numbers larger than 53 bits. Comparing them anyway (after conversion from string to int) may cause loss of accuracy. This itself is not very much an issue: only the first 41 bits of the ID can be used for comparison, the rest is simply to make sure it is actually an unique ID. The question remains where the loss of accuracy is: in the first 11 bits or the last 11 bits. If it's the last 11 bits that get ignored, there is no problem with comparing the numbers. If it's the first 11 bits that get ignored, you will have to shift the numbers 11 bits before comparing them. Tom On 11/1/10 7:47 PM, Jim Cortez wrote: I have learned that I can safely compare 2 long integer strings without any problem. Is comparing Snowflake direct message id's in the manner described safe? Jim On 11/1/10 11:29 AM, Jim Cortez wrote: Hello all, I have an non-browser xAuth client written in Javascript. I am in the process of changing up the codebase to use id_str in anticipation of Snowflake. One popular design decision we have made is to interleave sent and received direct messages into one unified list. Currently, we sort by message ID to figure out which message comes before the other. Since JS cannot parse the new 64bit integers, we can no longer do this. The only way I see to do this under Snowflake is to sort based on created_at, is that a valid approach? Is there a better way to approach this problem? Thank you, Jim Cortez -- 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
Re: [twitter-dev] De-duplicating Site Streams
* John Kalucki j...@twitter.com [101031 20:30]: Create two in-memory hash sets of seen ids. Write ids to both. If the id is found on write, discard. Alternatively expire them every few tens of minutes to bound growth, but provide continuous coverage. That's what I'm doing now for the Streaming API and it works very well. But in the Site Streams API, I might receive the same ID several times in context of different users (for_user). E.g., status N mentions users A, B, and C. In addition it is favorited by user D. If I'm following all 4 users is the in with Site Streams, I'll see N 4 times in 4 different messages. However, if any of those messages is repeated, I need to discard the repeats. So, I can't simply track status IDs like I do in the Streaming API. I need to track for_user/type/status_id. Or am I missing somethings, here? -Marc -- 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
[twitter-dev] Ability to Create Favorites / Retweet
I need help giving users the possibility to 'Favorite' and 'Retweet' tweets that are on my application. I don't really know where to start and tried using the Twurl console, but can't seem to find the right code. If anyone has done this before or knows a tutorial for setting this up I would greatly appreciate it! -- 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
Re: [twitter-dev] De-duplicating Site Streams
Isn't this a matter of just changing the keys? status_id becomes user_id:status_id? ---Mark http://twitter.com/mccv On Mon, Nov 1, 2010 at 12:18 PM, Marc Mims marc.m...@gmail.com wrote: * John Kalucki j...@twitter.com [101031 20:30]: Create two in-memory hash sets of seen ids. Write ids to both. If the id is found on write, discard. Alternatively expire them every few tens of minutes to bound growth, but provide continuous coverage. That's what I'm doing now for the Streaming API and it works very well. But in the Site Streams API, I might receive the same ID several times in context of different users (for_user). E.g., status N mentions users A, B, and C. In addition it is favorited by user D. If I'm following all 4 users is the in with Site Streams, I'll see N 4 times in 4 different messages. However, if any of those messages is repeated, I need to discard the repeats. So, I can't simply track status IDs like I do in the Streaming API. I need to track for_user/type/status_id. Or am I missing somethings, here? -Marc -- 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 -- 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
Re: [twitter-dev] Javascript, Snowflake, and Direct Message id's
When 2 numeric strings are compared, they are done by magnitude. Some tests: 10765432100123456789 10765432100123456790 = false 1076543210012345678901010101 10765432100123456789 = true 1076543210012345678901010101 10765432100123456789 = false 10765432100123456789 === 10765432100123456789 = true 10765432100123456789 == 10765432100123456789 = true 10765432100123456789 === 10765432100123456789010101011001 = false The only problem with this approach occurs when the numeric strings have a different length: 10 2 = true I get around this by checking length first. See this sort comparison function: function(b,a){ var aLen = a.id_str.length; var bLen = b.id_str.length; if(aLen == bLen){ return a.id_str b.id_str ? 1 : a.id_str == b.id_str ? 0 : -1; }else{ return aLen bLen ? 1 : 0-1; } } As for the JSON parser in our environment, I might be OK if what you say is true: var j = JSON.parse('{id: 10765432100123456789, id_str: 10765432100123456789}'); _dump(j); id: 10765432100123458000 id_str: 10765432100123456789 So my question about theoretical safety is still outstanding. If I compare Direct Message Snowflake ID's, will it blend? Jim On 11/1/10 12:00 PM, Tom van der Woerdt wrote: Yes, and no. Javascript has problems using numbers larger than 53 bits. Comparing them anyway (after conversion from string to int) may cause loss of accuracy. This itself is not very much an issue: only the first 41 bits of the ID can be used for comparison, the rest is simply to make sure it is actually an unique ID. The question remains where the loss of accuracy is: in the first 11 bits or the last 11 bits. If it's the last 11 bits that get ignored, there is no problem with comparing the numbers. If it's the first 11 bits that get ignored, you will have to shift the numbers 11 bits before comparing them. Tom On 11/1/10 7:47 PM, Jim Cortez wrote: I have learned that I can safely compare 2 long integer strings without any problem. Is comparing Snowflake direct message id's in the manner described safe? Jim On 11/1/10 11:29 AM, Jim Cortez wrote: Hello all, I have an non-browser xAuth client written in Javascript. I am in the process of changing up the codebase to use id_str in anticipation of Snowflake. One popular design decision we have made is to interleave sent and received direct messages into one unified list. Currently, we sort by message ID to figure out which message comes before the other. Since JS cannot parse the new 64bit integers, we can no longer do this. The only way I see to do this under Snowflake is to sort based on created_at, is that a valid approach? Is there a better way to approach this problem? Thank you, Jim Cortez -- 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
Re: [twitter-dev] De-duplicating Site Streams
* Mark McBride mmcbr...@twitter.com [101101 12:26]: Isn't this a matter of just changing the keys? status_id becomes user_id:status_id? Yes. Probably needs to be user_id/type/status_id to accommodate the case where a user favorites a status she was mentioned in. We'd get that one, twice---once for the mention and again for the favorite. -Marc -- 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
Re: [twitter-dev] XAuth authentication fail on Chinese machine
Hi, Most 401 Unauthorized errors (and especially the ones involving UTF8 characters) are because of errors in the Base String, used to generate the signature. Please use the validation tool at http://quonos.nl/oauthTester, it may help you a lot with validating your Base String. As access_token always involves usernames and passwords, please do substitute them with dummy ones for security reasons - just make sure that they at least look like the previous ones, because otherwise it would be hard to detect encoding issues. Tom PS: When dealing with encoding issues, XX'ing the values really doesn't help. On 11/1/10 6:58 PM, pawan wrote: Hi, We have created a Desktop Twitter application, In this application I have used XAuth feature to get data from Twitter API. It works fine on Win 7 Ultimate machine. However when I run my application's exe on core Chinese Win 7 machine, I got The remote server returned an error: (401) Unauthorized. error from following request: https://api.twitter.com/oauth/access_token?oauth_consumer_key=oauth_nonce=9644877oauth_signature_method=HMAC-SHA1oauth_timestamp=1288573328oauth_version=1.0x_auth_mode=client_authx_auth_password=XXx_auth_username=oauth_signature=XXX Can anyone help me out to know how to resolve this issue. Thanks, Pawan -- 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
[twitter-dev] Re: Failed to Auth on Japanese OS
The system date-time is in sync with local date-time. Exactly what the English OS is. I'm not sure what timezone it is set to, though. What else should I take under consideration? Could it be that the timezone is set to Japan yet the date-time is set to local? (It's not easy to find my way around this system being that I don't speak/write Japanese.) By the way, I have no trouble running two similar apps (on this machine) that talk with YouTube and Facebook apis. On Oct 30, 6:10 pm, nischalshetty nischalshett...@gmail.com wrote: @Gary oAuth takes the current time into consideration, so that really needs to be in sync. -N On Oct 31, 2:56 am, Gary cga...@gmail.com wrote: I checked and all characters are utf-8 - the auth header and the post body. I tried installing an English OS on the same machine so it's not machine specific. I also added charset=utf-8 to the content type header: application/x-www-form-urlencoded; charset=utf-8. Still I get the Failed to validate oauth signature and token. I'm not sure what the system clock would have to do with it. On Oct 29, 1:24 pm, Taylor Singletary taylorsinglet...@twitter.com wrote: Are there any other environmental issues, such as the system clock that might be different? Are you absolutely sure that all characters are UTF-8 in both environments, regardless of language? Taylor On Fri, Oct 29, 2010 at 1:04 PM, Gary cga...@gmail.com wrote: I should add that there are no Japanese characters in the message. It's all English. In fact I did try adding Japanese characters using the Engllish OS and that worked fine. Even when I used a Japanese character password, the English OS authenticated correctly. On Oct 29, 1:01 pm, Gary cga...@gmail.com wrote: Hi, I've had great success with the Twitter API until I tried it on a Japanese version of Windows. It fails to ...validate oauth signature and token. I have captured the output using wireshark and the outgoing message is identical to the English version of Windows. This does not happen on all Japanese OS machines, though. Is there a known problem in this area? -- 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 -- 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
[twitter-dev] Re: TwitterOAuth example gets 401 all the time
Check to make sure the clock on the server/computer is correct. If it is off by more then five minutes this is likely the problem. It can't be Abraham. It's synchronized with NTP so it should be perfect. Unless you've verified the time, it certainly CAN be. Even if a machine it setup to NTP, doesn't mean it can get there, is sucessful, etc. You need to check logs and verify that the time on the machine is now correct and NTP is happening. Note, on Windows servers, for example, the default frequency of NTP syncs is more than 24 hours. If you're running on a hosted virtual machine, drift can easily be hours over that time frame. How do I know this? Because I've had an Amazon EC2 SQL Server box that wouldn't stay synched (even though the IIS servers in the same availability zone are always correct) until I reset the NTP sync frequency to once every 20 minutes... no idea why that machine, but it was random 401s until I did. BTW, Twitter, can we PLEASE get a decent message in the human-readable chunk when the time signature is wrong? PLEASE? Marc Brooks Hack Prime http://stltweets.com -- 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
Re: [twitter-dev] Re: Failed to Auth on Japanese OS
When producing an oauth_timestamp for any method requiring authentication, the time needs to be indicated in seconds since the UTC epoch -- some programming languages have Date Time classes that deal with epoch time easily for you, others require more work. In any case, when generating an oauth_timestamp, you need to take your local time, convert it to UTC, and then calculate epoch seconds in that timezone. Further, the timestamp needs to be within ~ 5 minutes of Twitter's server clock. Our server clock is reported in the Date HTTP header response to each of your requests. Taylor On Mon, Nov 1, 2010 at 12:54 PM, Gary cga...@gmail.com wrote: The system date-time is in sync with local date-time. Exactly what the English OS is. I'm not sure what timezone it is set to, though. What else should I take under consideration? Could it be that the timezone is set to Japan yet the date-time is set to local? (It's not easy to find my way around this system being that I don't speak/write Japanese.) By the way, I have no trouble running two similar apps (on this machine) that talk with YouTube and Facebook apis. On Oct 30, 6:10 pm, nischalshetty nischalshett...@gmail.com wrote: @Gary oAuth takes the current time into consideration, so that really needs to be in sync. -N On Oct 31, 2:56 am, Gary cga...@gmail.com wrote: I checked and all characters are utf-8 - the auth header and the post body. I tried installing an English OS on the same machine so it's not machine specific. I also added charset=utf-8 to the content type header: application/x-www-form-urlencoded; charset=utf-8. Still I get the Failed to validate oauth signature and token. I'm not sure what the system clock would have to do with it. On Oct 29, 1:24 pm, Taylor Singletary taylorsinglet...@twitter.com wrote: Are there any other environmental issues, such as the system clock that might be different? Are you absolutely sure that all characters are UTF-8 in both environments, regardless of language? Taylor On Fri, Oct 29, 2010 at 1:04 PM, Gary cga...@gmail.com wrote: I should add that there are no Japanese characters in the message. It's all English. In fact I did try adding Japanese characters using the Engllish OS and that worked fine. Even when I used a Japanese character password, the English OS authenticated correctly. On Oct 29, 1:01 pm, Gary cga...@gmail.com wrote: Hi, I've had great success with the Twitter API until I tried it on a Japanese version of Windows. It fails to ...validate oauth signature and token. I have captured the output using wireshark and the outgoing message is identical to the English version of Windows. This does not happen on all Japanese OS machines, though. Is there a known problem in this area? -- 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 -- 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 -- 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
[twitter-dev] Re: TwitterOAuth example gets 401 all the time
On 1 nov, 21:00, @IDisposable idisposa...@gmail.com wrote: Check to make sure the clock on the server/computer is correct. If it is off by more then five minutes this is likely the problem. It can't be Abraham. It's synchronized with NTP so it should be perfect. Unless you've verified the time, it certainly CAN be. Even if a machine it setup to NTP, doesn't mean it can get there, is sucessful, etc. You need to check logs and verify that the time on the machine is now correct and NTP is happening. Note, on Windows servers, for example, the default frequency of NTP syncs is more than 24 hours. If you're running on a hosted virtual machine, drift can easily be hours over that time frame. Time is perfectly synchronized. I checked when I wrote my previous message and again now. There drift is half a second at most. Daylight saving time was changed yesterday, right before I checked for the first time. That's the only thing I can think that could make time differences, but I suppose time in Twitter's servers also changed so that couldn't be causing the 401. -- 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
Re: [twitter-dev] 401 Unauthorized errors with Progress Open Edge using xAuth to get Access token
Hi Martin, Thanks for your patience in working through xAuth with the issues you're facing. Given the information you've provided, it's difficult to determine exactly what might be amiss here. I'm unfamiliar with the programming environment you are using -- do you know if your HTTP transport method munges any HTTP headers or adds its own HTTP headers in any way? If you utilize an access token obtained through other means (such as by the procedure outlined in http://bit.ly/1token ) are you able to get any other kind of OAuth-based requests functional with your OAuth library? You mentioned that you successfully recreated the examples at http://dev.twitter.com/pages/xauth -- acknowledging that those values would also return a 401 from our API but provide a safe login password you can share on a public forum, is there any way you can perform an HTTP capture of the entire request cycle using those static values? This would allow us to see the entire HTTP request, including headers sent/received, the raw POST body, etc -- which may yield an obvious answer as to why your implementation is not working. Hang in there! Taylor On Tue, Oct 26, 2010 at 3:20 PM, Martin Hannah mhan...@coresoft.com.auwrote: We had an application successfully talking to twitter for a few years prior to oAuth, and now converting this application to xAuth and cant get past the first step. The application gets a 401 Unauthorized response when attempting to get the access token. Have confirmed our program when provided with the same consumer_key and Secret key as on twitter documentation page http://dev.twitter.com/pages/xauth produces exactly the same Singature, parameters, base string as on http://dev.twitter.com/pages/xauth doco page. (i.e. have done detailed string comparisons of output at each step to the twitter documentation http://dev.twitter.com/pages/xauth by placing the twitter values in a string variable and comparing to the values produced by our program, so confident these are the same) . Using our consumer and secret keys in the test site http://hueniverse.com/2008/10/beginners-guide-to-oauth-part-iv-signing-requests and compared the base string and signature results to our program and again they are exactly the same. Have checked the time stamp is producing correct time (based on enoch time) by comparing against against http://unixtimestamp.com/index.php Passing my consumer_secret with at end into signature generator (which as I said above seems to be producing correct results because we used values in http://dev.twitter.com/pages/xauth and it generated the same oauth_signature value) Base string: POSThttps%3A%2F%2Fapi.twitter.com%2Foauth %2Faccess_tokenoauth_consumer_key%3D1q0ZoaBf3fKFP1hSmhVNQ %26oauth_nonce %3Duv3AtzLBjawzvasO3EPAU3bbR53NyHGlvLp33IRCzG8%26oauth_signature_method %3DHMAC-SHA1%26oauth_timestamp%3D1288131701%26oauth_version %3D1.0%26x_auth_mode%3Dclient_auth%26x_auth_password%3D %26x_auth_username%3D Authorization header parameters: OAuth oauth_nonce=uv3AtzLBjawzvasO3EPAU3bbR53NyHGlvLp33IRCzG8, oauth_signature_method=HMAC-SHA1, oauth_timestamp=1288131701, oauth_consumer_key=1q0ZoaBf3fKFP1hSmhVNQ, oauth_signature=VQYSXdvrEtlvugqUpTXbCjYTNa0%3D, oauth_version=1.0 Twitter response: Status= 401 StatusTxt= Unauthorized Headers= Date: Tue, 26 Oct 2010 21:22:01 GMT Server: hi Status: 401 Unauthorized X-Transaction: 1288128121-92836-33309 Last-Modified: Tue, 26 Oct 2010 21:22:01 GMT X-Runtime: 0.00473 Content-Type: text/html; charset=utf-8 Pragma: no-cache X-Revision: DEV Expires: Tue, 31 Mar 1981 05:00:00 GMT Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post- check=0 Set-Cookie: _twitter_sess=BAh7CDoPY3JlYXRlZF9hdGwrCMdIa %252BorASIKZmxhc2hJQzonQWN0aW9uQ29u %250AdHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7ADoHaWQiJWJl %250AYzdlZGEzMDAwYmMwOWJhMTEwMzIyYjE1MTc5YzAw-- f24fc1f95d728598870821f98152985632dbcc66; domain=.twitter.com; path=/ Connection: close The actual Send procedure is: (tried procedure using both both blank and valid p-username and p-password) define var objHTTP as com-handle. Create Microsoft.XMLHTTP objHTTP . objHTTP:open(POST,api-atokin, false, p-username, p-password). objHTTP:setRequestHeader('Authorization', v-params). objHTTP:SetRequestHeader(Content-Type,application/x-www-form- urlencoded). objHTTP:send(). v-response = 'Response= ' + objHTTP:responseText + chr(10) + 'Status= '+ objHTTP:status + chr(10) + 'StatusTxt= ' + objHTTP:statusText + chr(10) + 'Headers= ' + objHTTP:getAllResponseHeaders() + chr(10) . I have emailed api.twitter.com and asked for them to check that I have xAuth enabled and they responded: I can confirm that your application, client ID xxx, has xAuth access and I just refreshed its permissions and consumer keys for good measure. If you still get 401 errors when trying to use xAuth
[twitter-dev] Re: One Click Background Image Upload
Where is the best place to go to get someone to write a script that will be able to do a background image auto-install? On Oct 4, 12:57 pm, gerri50 gnd...@gmail.com wrote: I will probably hit a brick wall when it comes to writing my own. Do you know how to? This person here has something running on their site but I cant find a way of getting in touch with the webmaster:http://justfreebackgrounds.com/twitter/inception-twitter-background/ On Oct 4, 9:53 am, Scott Wilcox sc...@dor.ky wrote: None that I've seen, you'll have to write your own. On 3 Oct 2010, at 11:05, gerri50 wrote: I have a wordpress site and have put together background images. Is there a solution out there that I can put up on the site that allows readers to simply click and upload the background to Twitter using oAuth? -- 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
[twitter-dev] User streaming - user mentions
I'm currently using the user streaming API to get all the usermentions made to a specific user (that the user follows). Unfortunately the onStatus method part of the UserStreamListener gets called every time a status message gets created for every user that the user follows. If you follow a large number of users then that could be called a number of times which is undesirable. Any ideas on how to go about this? Using the twitter streaming api filters would work but that would be for public profiles only, we would like it to work for profiles with protected tweets. Thanks. -- 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
[twitter-dev] Re: One Click Background Image Upload
Here. On Nov 1, 11:10 pm, gerri50 gnd...@gmail.com wrote: Where is the best place to go to get someone to write a script that will be able to do a background image auto-install? On Oct 4, 12:57 pm, gerri50 gnd...@gmail.com wrote: I will probably hit a brick wall when it comes to writing my own. Do you know how to? This person here has something running on their site but I cant find a way of getting in touch with the webmaster:http://justfreebackgrounds.com/twitter/inception-twitter-background/ On Oct 4, 9:53 am, Scott Wilcox sc...@dor.ky wrote: None that I've seen, you'll have to write your own. On 3 Oct 2010, at 11:05, gerri50 wrote: I have a wordpress site and have put together background images. Is there a solution out there that I can put up on the site that allows readers to simply click and upload the background to Twitter using oAuth? -- 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
Re: [twitter-dev] Re: One Click Background Image Upload
Someone on the list a few weeks ago posted code for this task. Best, -- Edward H. Hotchkiss http://www.edwardhotchkiss.com/ http://www.twitter.com/edwardhotchkiss/ -- On Nov 1, 2010, at 8:28 PM, micrypt wrote: Here. On Nov 1, 11:10 pm, gerri50 gnd...@gmail.com wrote: Where is the best place to go to get someone to write a script that will be able to do a background image auto-install? On Oct 4, 12:57 pm, gerri50 gnd...@gmail.com wrote: I will probably hit a brick wall when it comes to writing my own. Do you know how to? This person here has something running on their site but I cant find a way of getting in touch with the webmaster:http:// justfreebackgrounds.com/twitter/inception-twitter-background/ On Oct 4, 9:53 am, Scott Wilcox sc...@dor.ky wrote: None that I've seen, you'll have to write your own. On 3 Oct 2010, at 11:05, gerri50 wrote: I have a wordpress site and have put together background images. Is there a solution out there that I can put up on the site that allows readers to simply click and upload the background to Twitter using oAuth? -- 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 inline: edward.png-- 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
Re: [twitter-dev] Re: Change Background Image Not Working . Any help is appreciated
here is the post: Thanks a lot Matt. It worked. The two things I missed while trying to upload the background image using your excellent library. 1) include filename={thefilename.jpg} element in the parameter array 2) add the 'use' = 'true' element in the parameter array. Here is my final code $params = array( 'image' = @{$img_path};type=image/jpeg;filename={$image}, ); $params['use'] = 'true'; $tmhOAuth-request('POST', $tmhOAuth-url(account/ update_profile_background_image), $params, true, // use auth true // multipart ); On Oct 18, 6:54 pm, Matt Harris thematthar...@twitter.com wrote: There's an example in the tmhOAuth github project that has code for this: http://github.com/themattharris/tmhOAuth/blob/master/examples/images.php The big difference for background images is remembering to send the filename as well. There have also been some users who have found that their version of curl required changing 'image' = to '@image' If neither of those work can you share the image that isn't working and we'll see what could be the problem. Best --- @themattharris Developer Advocate, Twitterhttp://twitter.com/themattharris Best, -- Edward H. Hotchkiss http://www.edwardhotchkiss.com/ http://www.twitter.com/edwardhotchkiss/ -- On Oct 19, 2010, at 1:51 PM, x.charles.z wrote: Thanks a lot Matt. It worked. The two things I missed while trying to upload the background image using your excellent library. 1) include filename={thefilename.jpg} element in the parameter array 2) add the 'use' = 'true' element in the parameter array. Here is my final code $params = array( 'image' = @{$img_path};type=image/jpeg;filename={$image}, ); $params['use'] = 'true'; $tmhOAuth-request('POST', $tmhOAuth-url(account/ update_profile_background_image), $params, true, // use auth true // multipart ); On Oct 18, 6:54 pm, Matt Harris thematthar...@twitter.com wrote: There's an example in the tmhOAuth github project that has code for this: http://github.com/themattharris/tmhOAuth/blob/master/examples/images.php The big difference for background images is remembering to send the filename as well. There have also been some users who have found that their version of curl required changing 'image' = to '@image' If neither of those work can you share the image that isn't working and we'll see what could be the problem. Best --- @themattharris Developer Advocate, Twitterhttp://twitter.com/themattharris On Mon, Oct 18, 2010 at 4:04 PM, x.charles.z x.charle...@gmail.com wrote: I used the exact same code for the profile pic update except changing the api function. The profile picture update works, but unfortunately the background image update fails. $img_path = $_SERVER[DOCUMENT_ROOT].'/images/ twitter_bg/'.$image; require_once('./application/libraries/tmhOAuth.php'); $oauth_tokens = $this-session-userdata ('twitter_oauth_tokens'); $tmhOAuth = new tmhOAuth(array( 'consumer_key'= T_CONSUMER_KEY, 'consumer_secret' = T_CONSUMER_SECRET, 'user_token' = $oauth_tokens['access_token'], 'user_secret' = $oauth_tokens['access_token_secret'] )); $img_post = array('image' = @{$img_path};type=image/ jpeg;); $tmhOAuth-request('POST', $tmhOAuth-url(account/ update_profile_background_image), $img_post, true, // use auth true // multipart ); The picture is jpg and only 40kb The response I had: ( [date] = Mon, 18 Oct 2010 23:00:56 GMT [server] = hi [status] = 403 Forbidden [x_transaction] = 1287442856-44067-31467 [code] = 403 [response] = {error:There was a problem with your background image. Probably too big.,request:/1/account/ update_profile_background_image.json} Thanks for taking a look. -- 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 -- 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 -- 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:
Re: [twitter-dev] Json parse error / escape problem
Siqi, Yeah, I have written a custom parser for this, since I need only a small part of the status object, and the volume of statutes is quite large. I can share the Scala function that accounts for this change. This function only unescapes Unicode characters that directly map to ASCII. def unescape(s:String) = { val len=s.length var i=0 var c:Char=' ' val sb = new StringBuffer(len) while (ilen) { c = s.charAt(i) i += 1 if (c=='\\') { if (ilen) { val next = s.charAt(i); if (next=='u') { val code = Integer.parseInt(s.substring(i+1,i+5),16).intValue if (code 256) { c = code.toChar i += 5 } } else { c = next i += 1 } } sb.append(c) } sb.toString } And I take back my statement about Twitter's encoding being wrong. It is unusual but not wrong. On Mon, Nov 1, 2010 at 6:37 PM, Siqi Li siqi...@11outof10.com wrote: HI Harshad, What’s your parser? Do you write it yourself or just modifying any plug-in? Could you share the main part? cheers, -- Harshad RJ http://twitter.com/h__r__j -- 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
[twitter-dev] Useful undocumented parameter for :user/lists/memberships - filter_to_owned_lists
You can efficiently determine which lists owned by the authenticating user have a target user as a member by adding the parameter filter_to_owned_lists=true to :user/lists/memberships. This should probably be included in the documentation here: http://dev.twitter.com/doc/get/:user/lists/memberships -- 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
Re: [twitter-dev] User streaming - user mentions
Check the with parameter on the user streams documentation page http://dev.twitter.com/pages/user_streams. Setting it to with=user should do what you want. ---Mark http://twitter.com/mccv On Mon, Nov 1, 2010 at 4:25 PM, rahsyed rahs...@gmail.com wrote: I'm currently using the user streaming API to get all the usermentions made to a specific user (that the user follows). Unfortunately the onStatus method part of the UserStreamListener gets called every time a status message gets created for every user that the user follows. If you follow a large number of users then that could be called a number of times which is undesirable. Any ideas on how to go about this? Using the twitter streaming api filters would work but that would be for public profiles only, we would like it to work for profiles with protected tweets. Thanks. -- 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 -- 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