Re: [twitter-dev] Twitter streaming API using oauth with tracks that have spaces?
Try ui-encoding them first, my understanding of the Twitter OAuth signature validation is that it is non-standard (although there appears to be debate about this) I suspect if you encode them first before signing the url it will start to work -cj. On Tue, Nov 9, 2010 at 6:11 PM, dan dfran...@gmail.com wrote: I've been having trouble connecting to the streaming API using oauth if my tracks have spaces. I get 401s (unauthorized). In all cases, the same code works if the tracks don't have spaces. In Java: tried twitter4j (http://twitter4j.org/jira/browse/TFJ-420) and tweetstream4j (http://stackoverflow.com/questions/4129622/ connecting-to-twitter-streaming-api-with-tracks-with-spaces-using- apache-httpclie) In Python: tried tweepy (https://github.com/joshthecoder/tweepy/ issues#issue/64) The Twitter example using curl (http://dev.twitter.com/pages/ streaming_api_methods#track) works with tracks that have spaces, but it's basic auth. I am wondering if some oauth encoding versus POST param encoding is not working out. Can someone point me to a code example in Java or Python that is known to work connecting to the Twitter streaming API using oauth that has spaces in its tracks? Thanks in advance. -- 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] Re: Problem with uploading file to Twitpic
http://twitpic.zendesk.com/forums/76890-solutions http://twitpic.zendesk.com/forums/76890-solutions On Mon, Nov 8, 2010 at 11:57 PM, mlowicki mlowi...@gmail.com wrote: Does anyone know if there is forum/site dedicated for Twitpic API issues/questions? On Nov 8, 4:19 pm, Matt Harris mhar...@twitter.com wrote: Twitpic is a third party service which isn't supported by Twitter. For help with Twitpic you will need to contact them through their developer site. Best, @themattharris On Nov 6, 2010, at 17:51, mlowicki mlowi...@gmail.com wrote: Hi! I'm trying to write javascript code for uploading photos to Twitpic. This is Opera widget so i have cross-domain ajax. Authorization with Twitter works but when I send request to api.twitpic.com/2/upload.json I get {errors:[{code:400,message:Bad Request. Media not included in POST payload.}]} This is strange because I send media paramter: key={MY_KEY}message=messagemedia=iVBORw0KGgoNSUhEUgAA... Where the problem can be? -- 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 -- Mauro Sebastián Asprea E-Mail: mauroasp...@gmail.com Mobile: +34 654297582 Skype: mauro.asprea Algunos hombres ven las cosas como son y se preguntan porque. Otros sueñan cosas que nunca fueron y se preguntan por qué no?. George Bernard Shaw -- 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] API oauth friends_timeline request returning 401 status suddenly
Hi there, We have a web twitter application registered for our company to pull our live friends_timeline feed into our website...this was working fine after I changed from basic auth to the new oauth process to authenticate...but then on the 30th of October 2010 the feed suddenly started returning a 401 - Unauthorised status and subsequently my feed is outdated by some 300 hours. I tried going directly to the RSS feed of that timeline - put in both the username and password and was failed on Basic Authentication...LOL...as it should be I suppose =P. My method uses PHP cURL to do a call to the twitter API to return a JSON formatted feed. Please advise if you need the code, will gladly provide. I've isolated the twitter feed code and ran it on it's own, printed out the headers and this was the response... HTTP/1.1 401 Unauthorized Date: Wed, 10 Nov 2010 09:39:00 GMT Server: hi Status: 401 Unauthorized WWW-Authenticate: Basic realm=Twitter API Content-Type: application/json; charset=utf-8 Content-Length: 355 Cache-Control: no-cache, max-age=300 Set-Cookie: k=196.35.64.52.1289381940585414; path=/; expires=Wed, 17-Nov-10 09:39:00 GMT; domain=.twitter.com Set-Cookie: guest_id=128938194058991357; path=/; expires=Fri, 10 Dec 2010 09:39:00 GMT Set-Cookie: _twitter_sess=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo %250ASGFzaHsABjoKQHVzZWR7AA%253D %253D--1164b91ac812d853b877e93ddb612b7471bebc74; domain=.twitter.com; path=/ Expires: Wed, 10 Nov 2010 09:44:00 GMT Vary: Accept-Encoding Connection: close {error:Invalid \/ used nonce,request:\/1\/ statuses\/friends_timeline.json? oauth_consumer_key=KT2oGiqZNqEcX5dnXhVcOwoauth_nonce=1f057e825829dc1b1e73a7a6f2500815oauth_signature=e8e06pZFSbuJ2PCjlEmCljmt2GI=oauth_signature_method=HMAC- SHA1oauth_timestamp=1289378327oauth_token=102370244- KV2dBk4E7Q9OBx64boPmLRAcH3whabcLU6svO6Inoauth_version=1.0} The one problem that immediately screams at me is the Set-Cookie : k=196.35.64.52 part - which is the correct IP address, but not the domain representation - would this be a problem? I'm at a loss here, completely don't understand why it was working fine but now doesn't...thanks for any help in advance. -- 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] how to Post Tweets On Twitter using api in C# app
Hi, I am trying to post tweets using following code. protected void Page_Load(object sender, EventArgs e) { string url = ; string xml = ; oAuthTwitter oAuth = new oAuthTwitter(); if (Request[oauth_token] == null) { //Redirect the user to Twitter for authorization. //Using oauth_callback for local testing. oAuth.CallBackUrl = http://localhost:82/ default.aspx; Response.Redirect(oAuth.AuthorizationLinkGet()); } else { //Get the access token and secret. oAuth.AccessTokenGet(Request[oauth_token], Request[oauth_verifier]); if (oAuth.TokenSecret.Length 0) { //POST Test url = http://twitter.com/statuses/update.xml;; xml = oAuth.oAuthWebRequest(oAuthTwitter.Method.POST, url, status= + oAuth.UrlEncode(Hello @swhitley - Testing the .NET oAuth API)); apiResponse.InnerHtml = Server.HtmlEncode(xml); } } } 1. I am getting user Tweest xml properly . But In case Of Posting its giving 401 error code. link from where i get the code http://www.voiceoftech.com/swhitley/index.php/2009/03/twitter-oauth-with-net/ Any help? -- 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] API oauth friends_timeline request returning 401 status suddenly
[Just making a guess here] Is your server's clock correctly synchronized with NTP? Tom On 11/10/10 10:41 AM, Phillip du Plessis wrote: Hi there, We have a web twitter application registered for our company to pull our live friends_timeline feed into our website...this was working fine after I changed from basic auth to the new oauth process to authenticate...but then on the 30th of October 2010 the feed suddenly started returning a 401 - Unauthorised status and subsequently my feed is outdated by some 300 hours. I tried going directly to the RSS feed of that timeline - put in both the username and password and was failed on Basic Authentication...LOL...as it should be I suppose =P. My method uses PHP cURL to do a call to the twitter API to return a JSON formatted feed. Please advise if you need the code, will gladly provide. I've isolated the twitter feed code and ran it on it's own, printed out the headers and this was the response... HTTP/1.1 401 Unauthorized Date: Wed, 10 Nov 2010 09:39:00 GMT Server: hi Status: 401 Unauthorized WWW-Authenticate: Basic realm=Twitter API Content-Type: application/json; charset=utf-8 Content-Length: 355 Cache-Control: no-cache, max-age=300 Set-Cookie: k=196.35.64.52.1289381940585414; path=/; expires=Wed, 17-Nov-10 09:39:00 GMT; domain=.twitter.com Set-Cookie: guest_id=128938194058991357; path=/; expires=Fri, 10 Dec 2010 09:39:00 GMT Set-Cookie: _twitter_sess=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo %250ASGFzaHsABjoKQHVzZWR7AA%253D %253D--1164b91ac812d853b877e93ddb612b7471bebc74; domain=.twitter.com; path=/ Expires: Wed, 10 Nov 2010 09:44:00 GMT Vary: Accept-Encoding Connection: close {error:Invalid \/ used nonce,request:\/1\/ statuses\/friends_timeline.json? oauth_consumer_key=KT2oGiqZNqEcX5dnXhVcOwoauth_nonce=1f057e825829dc1b1e73a7a6f2500815oauth_signature=e8e06pZFSbuJ2PCjlEmCljmt2GI=oauth_signature_method=HMAC- SHA1oauth_timestamp=1289378327oauth_token=102370244- KV2dBk4E7Q9OBx64boPmLRAcH3whabcLU6svO6Inoauth_version=1.0} The one problem that immediately screams at me is the Set-Cookie : k=196.35.64.52 part - which is the correct IP address, but not the domain representation - would this be a problem? I'm at a loss here, completely don't understand why it was working fine but now doesn't...thanks for any help in advance. -- 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] API oauth friends_timeline request returning 401 status suddenly
Hi Phillip, The specific error you're receiving, Invalid / used nonce actually indicates that your timestamp is not in sync with ours. Make sure that you're converting to UTC (regardless of local timezone) before generating the epoch time in seconds. You might not be accounting for daylight savings time when converting to UTC. Taylor On Wed, Nov 10, 2010 at 1:41 AM, Phillip du Plessis philli...@gmail.comwrote: Hi there, We have a web twitter application registered for our company to pull our live friends_timeline feed into our website...this was working fine after I changed from basic auth to the new oauth process to authenticate...but then on the 30th of October 2010 the feed suddenly started returning a 401 - Unauthorised status and subsequently my feed is outdated by some 300 hours. I tried going directly to the RSS feed of that timeline - put in both the username and password and was failed on Basic Authentication...LOL...as it should be I suppose =P. My method uses PHP cURL to do a call to the twitter API to return a JSON formatted feed. Please advise if you need the code, will gladly provide. I've isolated the twitter feed code and ran it on it's own, printed out the headers and this was the response... HTTP/1.1 401 Unauthorized Date: Wed, 10 Nov 2010 09:39:00 GMT Server: hi Status: 401 Unauthorized WWW-Authenticate: Basic realm=Twitter API Content-Type: application/json; charset=utf-8 Content-Length: 355 Cache-Control: no-cache, max-age=300 Set-Cookie: k=196.35.64.52.1289381940585414; path=/; expires=Wed, 17-Nov-10 09:39:00 GMT; domain=.twitter.com Set-Cookie: guest_id=128938194058991357; path=/; expires=Fri, 10 Dec 2010 09:39:00 GMT Set-Cookie: _twitter_sess=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo %250ASGFzaHsABjoKQHVzZWR7AA%253D %253D--1164b91ac812d853b877e93ddb612b7471bebc74; domain=.twitter.com; path=/ Expires: Wed, 10 Nov 2010 09:44:00 GMT Vary: Accept-Encoding Connection: close {error:Invalid \/ used nonce,request:\/1\/ statuses\/friends_timeline.json? oauth_consumer_key=KT2oGiqZNqEcX5dnXhVcOwoauth_nonce=1f057e825829dc1b1e73a7a6f2500815oauth_signature=e8e06pZFSbuJ2PCjlEmCljmt2GI=oauth_signature_method=HMAC- SHA1oauth_timestamp=1289378327oauth_token=102370244- KV2dBk4E7Q9OBx64boPmLRAcH3whabcLU6svO6Inoauth_version=1.0} The one problem that immediately screams at me is the Set-Cookie : k=196.35.64.52 part - which is the correct IP address, but not the domain representation - would this be a problem? I'm at a loss here, completely don't understand why it was working fine but now doesn't...thanks for any help in advance. -- 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 streaming API using oauth with tracks that have spaces?
Think of it this way.. a valid POST body already must contain application/x-www-form-urlencoded encoded values for the body to be valid. Normalizing spaces to %20, and avoiding + is also a best practice. OAuth kicks in after you've already constructed a valid POST body. Here's an example of tracking a term with a space character in it: twitter api == POST Body track=twitter%20api == signature_base_string POSThttp%3A%2F%2Fstream.twitter.com %2F1%2Fstatuses%2Ffilter.jsonoauth_consumer_key%3Dri8JxYK2ddwSV5xIUfNNvQ%26oauth_nonce%3DQKWqIP8eEedgOPk5ujopscNxqeoafDNC0r6TZyLFM%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1289400791%26oauth_token%3D819797-torCkTs0XK7H2Y2i1ee5iofqkMC4p7aayeEXRTmlw%26oauth_version%3D1.0%26track%3Dtwitter%2520api == Authorization Header Authorization: OAuth oauth_nonce=QKWqIP8eEedgOPk5ujopscNxqeoafDNC0r6TZyLFM, oauth_signature_method=HMAC-SHA1, oauth_timestamp=1289400791, oauth_consumer_key=ri8JxYK2ddwSV5xIUfNNvQ, oauth_token=819797-torCkTs0XK7H2Y2i1ee5iofqkMC4p7aayeEXRTmlw, oauth_signature=jaEvelmcrQOkHdWADBvwZsQeGiQ%3D, oauth_version=1.0 Taylor On Wed, Nov 10, 2010 at 1:38 AM, Ciaran ciar...@gmail.com wrote: Try ui-encoding them first, my understanding of the Twitter OAuth signature validation is that it is non-standard (although there appears to be debate about this) I suspect if you encode them first before signing the url it will start to work -cj. On Tue, Nov 9, 2010 at 6:11 PM, dan dfran...@gmail.com wrote: I've been having trouble connecting to the streaming API using oauth if my tracks have spaces. I get 401s (unauthorized). In all cases, the same code works if the tracks don't have spaces. In Java: tried twitter4j (http://twitter4j.org/jira/browse/TFJ-420) and tweetstream4j (http://stackoverflow.com/questions/4129622/ connecting-to-twitter-streaming-api-with-tracks-with-spaces-using- apache-httpclie) In Python: tried tweepy (https://github.com/joshthecoder/tweepy/ issues#issue/64) The Twitter example using curl (http://dev.twitter.com/pages/ streaming_api_methods#track) works with tracks that have spaces, but it's basic auth. I am wondering if some oauth encoding versus POST param encoding is not working out. Can someone point me to a code example in Java or Python that is known to work connecting to the Twitter streaming API using oauth that has spaces in its tracks? Thanks in advance. -- 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
Re: [twitter-dev] Perl developers, watch out for status IDs
* Cameron Kaiser spec...@floodgap.com [101109 20:41]: If you are on a Perl that does not have 64-bit int and you are not using the stringified *_str fields, you may have overflowed the Perl precision limit this morning, which bit TTYtter users hard. Just a friendly warning to check your code, or use BigInt if you can rely on that support. Cameron, I'm not experiencing any problems in Net::Twitter applications. As long as id. All of JSON::Any backends (JSON::XS, typically) result in a value that maintains its full precision as long as it's used in a string context. Am I missing something that's going to bite me (and therefore Net::Twitter users in general)? If you're treating it purely as a string, no (but I don't know how JSON::* handles things that appear to be integer values, and id is not stringified itself in the raw JSON). perl -MJSON::XS=decode_json -E \ '$r=decode_json q({id:9876543210123456789}); say $r-{id}' # 9876543210123456789 Using Devel::Peek, the decoded 19 digit number is represented as a string, internally, by perl: SV = PV(0x9e98280) at 0x9e3d678 REFCNT = 1 FLAGS = (POK,pPOK) PV = 0x9c9c0a8 9876543210123456789\0 CUR = 19 LEN = 20 So, I think as long as perl apps only use the new, longer IDs in string context, they should be ok. I've tested some typical scenarios using each of the JSON::Any backends, storing and retrieving to a MySQL BIGINT field, etc. It may very well be safer to use the id_str values---certainly more explicit. But I haven't found common usage that will fail with the new, longer IDs. -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] Announcing: Free Open Source Twitter Framework in PHP
I have just published the first version of a Twitter aggregation database and tweet display framework called 140dev. The code is at: http://140dev.com/free-twitter-api-source-code-library/ This is written in PHP and MySQL on the server side, and JQuery and Javascript on the client side. The functionality is pretty basic now, but I have plans to extend it over time. This code is very heavily documented, and is meant as a working tutorial for Twitter API programming. It uses the Phirehose library to access the Twitter Streaming API and collect tweets containing a set of keywords, stores the tweets into a normalized MySQL database, and then returns the most recent tweets as linkified, formatted HTML. Javascript code in the browser uses Ajax to load older tweets, and to automatically update a count of new tweets, as done on Twitter.com. The result is a real-time tweet stream that can be added to any Web page with a single line of PHP code. I'd really appreciate any comments you have on this code. It is GPLed and has a plugin architecture, so if anyone wants to add on to it, let me know. - Adam Green http://140dev.com 140...@gmail.com @140dev -- 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] Announcing: Free Open Source Twitter Framework in PHP
Excellent! You may have finally motivated me to learn PHP, MySQL, Javascript and JQuery. ;-) Seriously, though, have you given any thought to signing up with SUSE Studio and packaging this up as an appliance? -- M. Edward (Ed) Borasky http://borasky-research.net http://twitter.com/znmeb A mathematician is a device for turning coffee into theorems. - Paul Erdos Quoting Adam Green 140...@gmail.com: I have just published the first version of a Twitter aggregation database and tweet display framework called 140dev. The code is at: http://140dev.com/free-twitter-api-source-code-library/ This is written in PHP and MySQL on the server side, and JQuery and Javascript on the client side. The functionality is pretty basic now, but I have plans to extend it over time. This code is very heavily documented, and is meant as a working tutorial for Twitter API programming. It uses the Phirehose library to access the Twitter Streaming API and collect tweets containing a set of keywords, stores the tweets into a normalized MySQL database, and then returns the most recent tweets as linkified, formatted HTML. Javascript code in the browser uses Ajax to load older tweets, and to automatically update a count of new tweets, as done on Twitter.com. The result is a real-time tweet stream that can be added to any Web page with a single line of PHP code. I'd really appreciate any comments you have on this code. It is GPLed and has a plugin architecture, so if anyone wants to add on to it, let me know. - Adam Green http://140dev.com 140...@gmail.com @140dev -- 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] Statuses Count / Tweets Count Off
It looks like some users have recently had their Tweets count go down to 0 (or near there). Looks like it hasn't been happening for very long, but it's showing up with the incorrect statuses count on twitter (new/old) and through the API. Here's a few random people this is happening on: http://twitter.com/#!/heidimontag (1 tweet) http://twitter.com/#!/moooris http://twitter.com/#!/MallikaLA http://twitter.com/#!/wholesaler http://twitter.com/#!/BuyBetter I saw there's a link on the help desk for a general statuses are off issue ( http://support.twitter.com/groups/32-something-s-not-working/topics/119-tweet-dm-problems/articles/277671-tweet-count-is-incorrect-known-issue ) but this looked like it could be something else. Seems like a load of people in those comments are having the same issues. I was wondering if there was any word on when a fix would be out for 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] Optimizing Twitter Calls
I am currently integrating Twitter with a small social network. I am using PHP and the twitteroauth library. The idea is that a user can sync their account to their Twitter. So when they post on their wall, it will send a tweet and it will post their tweets onto their wall. Currently, I am gathering user tweets via a PHP script run by cron that runs like this: 1. go through every user that has connected to their twitter account 2. pull the last 20 tweets for each user. 3. See if any of these tweets are new. If so, deposit into database. My worry is that we make a call to Twitter for each user connected and we'll quickly hit our rate limit, even if we get whitelisted. Is there a more streamlined way to gather people's tweets? -- 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] Optimizing Twitter Calls
On Wed, Nov 10, 2010 at 11:08 AM, mage26 mag...@gmail.com wrote: I am currently integrating Twitter with a small social network. I am using PHP and the twitteroauth library. The idea is that a user can sync their account to their Twitter. So when they post on their wall, it will send a tweet and it will post their tweets onto their wall. Currently, I am gathering user tweets via a PHP script run by cron that runs like this: 1. go through every user that has connected to their twitter account 2. pull the last 20 tweets for each user. 3. See if any of these tweets are new. If so, deposit into database. You could easily replace this by using the streaming API. No rate limiting no cron job, just works. --d -- 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] preg_replace a List name
I'm working on a module that will allow a user to pull up the tweets from a specified list. One of the issues I'm facing is converting the group name from the user inputted name to it's URL counterpart. For example, It's all J!, baby is called as it-s-all-j-baby via the URL. Does anyone have any suggestions for a preg_replace I can use in my code to convert group names in a similar manner used by twitter.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
[twitter-dev] Twitter seems to be ignoring since_id parameter for friends timeline (max_id is fine; just the since_id is the problem)
The below call tries to get twitter post since: 2176149991981057 but I get the tweets for the first page. max_id is fine but just the since_id is the problem. Am I missing something? https://twitter.com/statuses/friends_timeline.json?count=100oauth_consumer_key=[removed]oauth_nonce=[removed]oauth_signature_method=HMAC-SHA1oauth_timestamp=1289425367oauth_token=[removed]oauth_version=1.0since_id=2176149991981057oauth_signature=[removed] [First page] Top Twitter post ID: 2474929752645632 BottomTwitter post ID: 2376727787470848 Going to older 2nd page: max_id 2376727787470848 [2nd page] 2375603508477952 2176623264665600 Going to older 3rd page: max_id 2176623264665600 [3rd page] 2176149991981056 2056617872859136 Going back to 3rd page: NEWER since_id 2176149991981056 BELOW list of msgs is same as first-page's list--- 2474929752645632 2376727787470848 -- 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] Return Code 401 - can't see why I get this?
Hi, Hoping someone can point me in the right direction... I am almost there. Attempting to update my Twitter stream with the currently playing song and artist from my radio station. In the appropriate CFG file I have the correct codes and secrets. Checked them a zillion times .. but on debug, still get this error. I cut an paste the codes, so there is no chance of mis-typing them. Current Time Referenced To Twitter Server Wed Nov 10 07:02:43 + 2010 [Attempting Update] - ( 66-chrs Used / 74-chrs Remaining ) Iono you know you never said it by Tummel... now at Quantum Radio Update Failed - [Return Code] = 401 - Unauthorized = Thanks if anyone can point me in the right direction. btw, I am a very experienced programmer/coder, just can't see my way with this one. Thanks Robert -- 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] Snowflake and yajl-objc
Will the conversion to Snowflake affect clients using the yajl-objc framework? Does yajl-objc already parses 64-bit unsigned integers correctly? -- 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] Identify Suspended Accounts
If memory serves, Twitter is still returning suspended accounts in the followers API calls. I try to identify and mark these users in my own database so I don't display them to my end user, however this is a difficult and resource intensive task. One in which I have to worry about false positives. Does anyone know of a service that is simply a reliable ever updating giant list of suspended accounts that I can rub against my database to clean it? Alternatively, if the API would stop returning suspended accounts in the follow data, I could skip this data cleanup step. ;) This has been an issue for at least a year and a half now. http://bit.ly/agSBZ7 -- 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: Oauth Incorrect Signature or Could not authenticate error
Thanks! This helped. I was adding the optional param PAGE=x (where x is a number) on the url for gets. And it wasn't being sorted. So the only problem I have left is why when I do a Http POST through Indy components to do a delete like https://api.twitter.com/1/statuses/destroy/999.xml with the parameters being passed to the post. If I take this url and the parameters out and use Fiddler, it deletes it. However it gives a 401 in my app. In the app, I'm setting the contenttype as 'application/x-www-form- urlencoded' this is correct from what I know. using Indy Components V10 What could I be doing wrong? --David On Nov 10, 3:30 am, Tom van der Woerdt i...@tvdw.eu wrote: Looks like a Base String issue. Please check your Base String at http://quonos.nl/oauthTester/. Tom On 11/10/10 12:55 AM, DavidD wrote: On a get of the DIRECT MESSAGES (response) hash errorIncorrect signature/error request/1/direct_messages.xml? page=1amp;oauth_consumer_key=XXamp;oauth_nonce=9F8A26E63EE0F990765DBA32C5B67F60amp;oauth_signature_method=HMAC- SHA1amp;oauth_signature=IXRybwcP7Z5Wt3IRcFxW1FOjhGo %3Damp;oauth_timestamp=1289346103amp;oauth_token=XXamp;oauth_version=1.0/ request /hash Anything that sticks out? On Nov 8, 1:43 am, udta 477914...@163.com wrote: No code, No answer What is the lib you are using? Maybe the post body's urlencoding is wrong. Maybe you will meet the same problem when friendship create... At 2010-11-08 13:20:13,DavidD ddudl...@gmail.com wrote: Also Favorites works fine. No errors. I'm not sure why this works and direct_messages doesn't, nor will destroy on a status id I really am at a loss here. Can no one give me a pointer as to my problem? Are there any issues with these api's? David On Nov 6, 5:39 pm, DavidD ddudl...@gmail.com wrote: I am getting an 401 Unauthorized with an Incorrect Signature or Could not authenticate error when trying to get Direct Messages after getting an access token I can get a user_timeline no problem and I believe favorites but the Direct Messages and home_timeline I get an error. I also have a 401 when I try and delete a tweet from the user timeline. I am stuck and need help. Thanks! David -- 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- Hide quoted text - - Show quoted text - -- 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: Snowflake: An update and some very important information
Hello. Couple questions: 1.) Are you planning on eventually eliminating the integer representation and only using strings for id's? 2.) If an application doesn't use Javascript to parse JSON (for example, YAJL-OBJC and NSNumbers in Obj-C), is it necessary to make any changes at all? Thanks. On Oct 19, 3:52 pm, Matt Harris thematthar...@twitter.com wrote: Hey everyone, Thank you to all of you for your questions, patience and contributions to this thread. Hearing your views and knowing how you use the API helps us provide more information where there wasn't enough, and clarify details where there was ambiguity. I've collated the questions i've received from you directly, over Twitter to @twitterapi and through this list. I hope the comments below provide enough information to answer those questions and explain the reasoning being our decisions. Thanks for your support and patience, @themattharris 1) Will search.twitter.com also include id_str and in_reply_to_status_id_str? Yes, Search will include the String representations of those IDs. 2) Which fields are affected by this change? All IDs which are transmitted as Integers will have a String representation in the API response. Only Tweet IDs (which includes mentions and retweets) will be moving to new Snowflake IDs. Messages (DMs), Saved Searches and Users may change to a Snowflake ID scheme in the future but this isn’t planned for this year. We are adding String representations of the Integer IDs now so you can update all of your code to use the String representations throughout. to allow developers to make the change now for all the ID fields and be prepared should any other IDs break the 53bit boundary. 3) Which fields will have String representations? The fields which will have String representations are: id (DM, Saved Search, User, List ) in_reply_to_status_id in_reply_to_user_id new_id (Streaming only. Will be removed when Snowflake is enabled) current_user_retweet_id (When include_my_retweet=1 is passed) 4) Can you provide a complete Tweet example with Snowflake ID to test? [{coordinates:null,truncated:false,created_at:Thu Oct 14 22:20:15 + 2010,favorited:false,entities:{urls:[],hashtags:[],user_mentions :[{name:Matt Harris,id:777925,id_str:777925,indices:[0,14],screen_name:thema ttharris}]},text:@themattharris hey how are things?,annotations:null,contributors:[{id:819797,id_str:819797, screen_name:episod}],id:10765432100123456789,id_str:10765432100123 456789,retweet_count:0,geo:null,retweeted:false,in_reply_to_user_id :777925,in_reply_to_user_id_str:777925,in_reply_to_screen_name:them attharris,user:{id:6253282,id_str:6253282},source:web,place: null,in_reply_to_status_id:10586268426842688951,in_reply_to_status_id_st r:10586268426842688951}] 5) What is happening with new_id in the Streaming API? new_id and new_id_str will be switched off when or soon after Snowflake is enabled on November 4th. 6) Why not restrict IDs to 53bits? A Snowflake ID is composed: * 41bits for millisecond precision time (69 years) * 10bits for a configured machine identity (1024 machines) * 12bits for a sequence number (4096 per machine) The factor influencing the length of the ID is the time. For a 53bit ID this would mean only 31bits are available for the time. 31bits is only enough for 24 days (2147483648/(1000*60*60*24)) of time. Reducing the resolution of the timestamp would prevent a K-sorted resolution of 1 second or less. Reducing the configured machine identity or sequence number by 1bit would mean we couldn’t scale Twitter, or operate our infrastructure in an uncoordinated high-available way. 7) When will the 53bit Integer overflow happen? 24 days after Snowflake starts counting. 8) Is it safe to parse and store IDs as signed 64bit Integers? Yes. 9) Why offer both the String and Integer versions of the ID? The String representation is needed to ensure languages which cannot convert the 53bit Integer can still use the ID in other API requests. The Integer value is being retained for languages which can handle numbers53bit and to prevent applications which have not converted from being cut-off from Twitter. 10) When ID is null what will the _str representation be? The _str representation will also be null. 11) Did you really mean ‘unsigned’ 64bit Integer? Strictly speaking the Snowflake is a signed 64bit long under the hood. That being said, we will never use the negative bit and won’t require the full 64bits for positive numbers for about 69 years: http://www.google.com/search?q=%282**41%29+%2F+%2860*60*24*1000%29+%2... 12) Why not make the strings opt-in? We did consider this as an option but decided against it for a number of reasons. The first reason is that the ID is fundamental to being able to work with the data from the API so receiving the correct ID shouldn’t be something you have to opt into. The second, more influential
Re: [twitter-dev] Identify Suspended Accounts
Hey Dusty, It's currently assigned to @al3x, I'm sure he'll get to it some day. ;-) I have a list of about 28k suspended ids or deleted accounts, out of around 8m I have on file. I'm pretty sure there's maybe 5% or so false positives in there, as accounts become unsuspended but I don't have an automatic process in place checking for that. The 5% guess is based on a manual check about a month ago. I'd be happy to share this list with you if Twitter's not going to provide something themselves. Perhaps we could swap ids.. Cheers, Tim. On Thu, Nov 11, 2010 at 11:12 AM, DustyReagan dustyrea...@gmail.com wrote: If memory serves, Twitter is still returning suspended accounts in the followers API calls. I try to identify and mark these users in my own database so I don't display them to my end user, however this is a difficult and resource intensive task. One in which I have to worry about false positives. Does anyone know of a service that is simply a reliable ever updating giant list of suspended accounts that I can rub against my database to clean it? Alternatively, if the API would stop returning suspended accounts in the follow data, I could skip this data cleanup step. ;) This has been an issue for at least a year and a half now. http://bit.ly/agSBZ7 -- 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] Re: Snowflake: An update and some very important information
1) Please don't, I don't want to have to convert everything back to integers within my code. I consider the string representation a hack around some issues with certain programming languages, and not an optimal solution. Wouldn't want this to become the default option. 2) No Tom On 11/11/10 6:34 AM, SM wrote: Hello. Couple questions: 1.) Are you planning on eventually eliminating the integer representation and only using strings for id's? 2.) If an application doesn't use Javascript to parse JSON (for example, YAJL-OBJC and NSNumbers in Obj-C), is it necessary to make any changes at all? Thanks. On Oct 19, 3:52 pm, Matt Harris thematthar...@twitter.com wrote: Hey everyone, Thank you to all of you for your questions, patience and contributions to this thread. Hearing your views and knowing how you use the API helps us provide more information where there wasn't enough, and clarify details where there was ambiguity. I've collated the questions i've received from you directly, over Twitter to @twitterapi and through this list. I hope the comments below provide enough information to answer those questions and explain the reasoning being our decisions. Thanks for your support and patience, @themattharris 1) Will search.twitter.com also include id_str and in_reply_to_status_id_str? Yes, Search will include the String representations of those IDs. 2) Which fields are affected by this change? All IDs which are transmitted as Integers will have a String representation in the API response. Only Tweet IDs (which includes mentions and retweets) will be moving to new Snowflake IDs. Messages (DMs), Saved Searches and Users may change to a Snowflake ID scheme in the future but this isn’t planned for this year. We are adding String representations of the Integer IDs now so you can update all of your code to use the String representations throughout. to allow developers to make the change now for all the ID fields and be prepared should any other IDs break the 53bit boundary. 3) Which fields will have String representations? The fields which will have String representations are: id (DM, Saved Search, User, List ) in_reply_to_status_id in_reply_to_user_id new_id (Streaming only. Will be removed when Snowflake is enabled) current_user_retweet_id (When include_my_retweet=1 is passed) 4) Can you provide a complete Tweet example with Snowflake ID to test? [{coordinates:null,truncated:false,created_at:Thu Oct 14 22:20:15 + 2010,favorited:false,entities:{urls:[],hashtags:[],user_mentions :[{name:Matt Harris,id:777925,id_str:777925,indices:[0,14],screen_name:thema ttharris}]},text:@themattharris hey how are things?,annotations:null,contributors:[{id:819797,id_str:819797, screen_name:episod}],id:10765432100123456789,id_str:10765432100123 456789,retweet_count:0,geo:null,retweeted:false,in_reply_to_user_id :777925,in_reply_to_user_id_str:777925,in_reply_to_screen_name:them attharris,user:{id:6253282,id_str:6253282},source:web,place: null,in_reply_to_status_id:10586268426842688951,in_reply_to_status_id_st r:10586268426842688951}] 5) What is happening with new_id in the Streaming API? new_id and new_id_str will be switched off when or soon after Snowflake is enabled on November 4th. 6) Why not restrict IDs to 53bits? A Snowflake ID is composed: * 41bits for millisecond precision time (69 years) * 10bits for a configured machine identity (1024 machines) * 12bits for a sequence number (4096 per machine) The factor influencing the length of the ID is the time. For a 53bit ID this would mean only 31bits are available for the time. 31bits is only enough for 24 days (2147483648/(1000*60*60*24)) of time. Reducing the resolution of the timestamp would prevent a K-sorted resolution of 1 second or less. Reducing the configured machine identity or sequence number by 1bit would mean we couldn’t scale Twitter, or operate our infrastructure in an uncoordinated high-available way. 7) When will the 53bit Integer overflow happen? 24 days after Snowflake starts counting. 8) Is it safe to parse and store IDs as signed 64bit Integers? Yes. 9) Why offer both the String and Integer versions of the ID? The String representation is needed to ensure languages which cannot convert the 53bit Integer can still use the ID in other API requests. The Integer value is being retained for languages which can handle numbers53bit and to prevent applications which have not converted from being cut-off from Twitter. 10) When ID is null what will the _str representation be? The _str representation will also be null. 11) Did you really mean ‘unsigned’ 64bit Integer? Strictly speaking the Snowflake is a signed 64bit long under the hood. That being said, we will never use the negative bit and won’t require the full 64bits for positive numbers for about 69 years: