Re: [twitter-dev] @anywhere in Safari4/Mac - wont work
It looks to me like your hovercards are not finding a screen name rather than it being a browser issue. The Unsafe javascript attempt is a warning and does not effect operation. On Wed, May 12, 2010 at 8:17 AM, Felix Kunsmann fe...@kunsmann.eu wrote: Hello, I'm trying to use @anywhere hovercards in my Blog (Link below). It seems that Safari is blocking all requests to Twitter, so is there a way to fix that (or to duplicate hovercard functionality)? -- Dan Webb Front-end Engineer, Platform d...@twitter.com / @danwrong +1 415 425 5631
Re: [twitter-dev] Re: Verify user connect with @anywhere?
Shortly we'll be providing the logged in user's id along with a signature that will allow you to verify it is genuine. Stay tuned. On Wed, May 12, 2010 at 6:14 PM, Abraham Williams 4bra...@gmail.com wrote: I don't think it is officially supported as a public API but you can pull the twttr_anywhere cookie which contains an access token. https://api.twitter.com/1/account/verify_credentials.xml?oauth_access_token=xyz Abraham -- Dan Webb Front-end Engineer, Platform d...@twitter.com / @danwrong +1 415 425 5631
[twitter-dev] StatusCode is -1 and isCausedByNetworkIssue is true Help Me!!!
The following pages on the server was created. - ?xml version=1.0 encoding=utf-8? %...@page contentType=text/xml;charset=utf-8 % data %@ page import=java.util.List% %@ page import=java.lang.System% %@ page import=twitter4j.Twitter% %@ page import=twitter4j.Tweet% %@ page import=twitter4j.Query% %@ page import=twitter4j.QueryResult% %@ page import=twitter4j.TwitterFactory% %@ page import=twitter4j.TwitterException% % Twitter twitter = new TwitterFactory().getInstance(); Query query = new Query(twitter ); QueryResult result = twitter.search(query); for (Tweet tweet : result.getTweets()) { % item userName![CDATA[%=tweet.getFromUser()%]]/userName userContents![CDATA[%=tweet.getText()%]]/userContents /item % } % /data But the result is output as shown below. -- ?xml version=1.0 encoding=utf-8 ? - data result3/result getStatusCode-1/getStatusCode getRateLimitStatusnull/getRateLimitStatus exceededRateLimitationfalse/exceededRateLimitation resourceNotFoundfalse/resourceNotFound isCausedByNetworkIssuetrue/isCausedByNetworkIssue /data I am looking for now is for this reason. Specific IP address of the server also try to disable the firewall, the love that the results are terrible. Please help. Please
[twitter-dev] Need help on customized APIs
Hi All, We are planning to integrate one of our customers site (Twitter live chat service/blogs/follow-ups) with Twitter. When we try to run a sample application with Twitter open source APIs, we were not getting the desired output relatively. Could anyone suggest on customized APIs (or paid service API) from Twitter which will accomplish our goal? Regards, Sekhar
[twitter-dev] providing follow link
Hi, I'm developing a iPhone app and i have created a twitter account for this iPhone app. I want to provide a link follow APPLICATION NAME on twitter within the app. By clicking on this link the user should be added to the followers list of the iPhone app. Is it possible to do using the existing twitter APIs. Please guide me on this. Cheers, castelino
[twitter-dev] Re: Whitelist Limits for Direct Messaging
Got it. Thanks again Brian. -Mo On May 12, 4:27 pm, Brian Sutorius bsutor...@twitter.com wrote: I'm not sure what you mean - our REST whitelist only accepts usernames and IP addresses as whitelistable entities. Applications don't send direct messages, users do; the DM limit is on a per-user basis. Brian On May 12, 1:27 pm, Mo maur...@moluv.com wrote: Thanks Brian and Taylor. This definitely adds some clarification. There is one last thing, though. Brian, you mentioned that the limits you specified were NOT for IPs and apps. What would be the DM limit for a whitelisted app? I can't find that explicitly stated in any of the references. On May 12, 12:31 pm, Brian Sutorius bsutor...@twitter.com wrote: As I posted in another thread [1], here is information from our help center [2] to hopefully clarify this: - By default, Twitter accounts can send 250 DMs per day. - Accounts (not IPs and not apps) that are on the REST whitelist can send up to 10,000 DMs per day Taylor's point about the limit being account-based and not application- based is important to note. Brian Sutorius [1]http://bit.ly/9DyGDB [2]http://help.twitter.com/entries/160385 On May 12, 9:08 am, Taylor Singletary taylorsinglet...@twitter.com wrote: To my knowledge (and I might be wrong, but this is what I understand to be true): - there is a limit of 250 DMs per day for a user account, blanketly applied. Whitelisting for an application has no effect on this limit. This isn't an API limit. It's a limit for a Twitter user. A twitter user could contribute to their allocation by using the website or an API client. Taylor Singletary Developer Advocate, Twitterhttp://twitter.com/episod On Wed, May 12, 2010 at 8:43 AM, Mo maur...@moluv.com wrote: I'm trying to find a reliable source for whitelist limits for Direct Messaging. I looked through the direct messaging limits and best practices for individual services? thread -http://bit.ly/cLVv1Qbut there weren't any authoritative descriptions of whitelist limits. What I'm looking for is: 1. DMs allowed per user per hour, and per day - (Where user is defined as someone using an app). 2. DMs allowed per app per hour, and per day I saw that Doug Williams had said that whitelisted users get 5000 DMs per day, but didn't specify whether that was an app total or a total for a random user using an app for DMs. The hourly limit for whitelisted apps wasn't specified at all. -Mo http://www.pay4tweet.com
Re: [twitter-dev] providing follow link
Hi Castelino, The API does offer the ability to follow a user. You'll first have to authenticate the user through OAuth or xAuth to obtain an access token on their behalf (which I assume you are doing anyway). You then offer the link and when clicked, perform the following API call: POST http://api.twitter.com/*1* /friendships/create/your_application_screen_name.json This will result in the current user following your_application_screen_name Taylor Singletary Developer Advocate, Twitter http://twitter.com/episod On Thu, May 13, 2010 at 6:21 AM, castelino praveencastel...@gmail.comwrote: Hi, I'm developing a iPhone app and i have created a twitter account for this iPhone app. I want to provide a link follow APPLICATION NAME on twitter within the app. By clicking on this link the user should be added to the followers list of the iPhone app. Is it possible to do using the existing twitter APIs. Please guide me on this. Cheers, castelino
Re: [twitter-dev] StatusCode is -1 and isCausedByNetworkIssue is true Help Me!!!
Wrong list. Try list for the library you're using. Twitter4j? Andy Badera via HTC Incredible On May 13, 2010 6:13 AM, 송록지기 genesis...@gmail.com wrote: The following pages on the server was created. - ?xml version=1.0 encoding=utf-8? %...@page contentType=text/xml;charset=utf-8 % data %@ page import=java.util.List% %@ page import=java.lang.System% %@ page import=twitter4j.Twitter% %@ page import=twitter4j.Tweet% %@ page import=twitter4j.Query% %@ page import=twitter4j.QueryResult% %@ page import=twitter4j.TwitterFactory% %@ page import=twitter4j.TwitterException% % Twitter twitter = new TwitterFactory().getInstance(); Query query = new Query(twitter ); QueryResult result = twitter.search(query); for (Tweet tweet : result.getTweets()) { % item userName![CDATA[%=tweet.getFromUser()%]]/userName userContents![CDATA[%=tweet.getText()%]]/userContents /item % } % /data But the result is output as shown below. -- ?xml version=1.0 encoding=utf-8 ? - data result3/result getStatusCode-1/getStatusCode getRateLimitStatusnull/getRateLimitStatus exceededRateLimitationfalse/exceededRateLimitation resourceNotFoundfalse/resourceNotFound isCausedByNetworkIssuetrue/isCausedByNetworkIssue /data I am looking for now is for this reason. Specific IP address of the server also try to disable the firewall, the love that the results are terrible. Please help. Please
[twitter-dev] Re: Service Application
Okay so i was able to write up an app to pull the access token, and secret. When sending a message using OAuth. how must it be done? all the documentation i see shows the older one user:password, and not using the OAuth. i will be using this to write in C++ environment, and a javascript. Thank you in advance On May 12, 9:06 pm, Michael Cameron darx...@gmail.com wrote: Users sign up in the background what matters is the dcl request that contains the username which we send with the twitter account credentials via BasicAuth. Using C++, and a JavaScript file to send the Request to twitter. (note this is working via basicAuth) Would it make sense to create something that retrieves the access token for the app and store it? On May 12, 2:23 pm, Abraham Williams 4bra...@gmail.com wrote: How do users sign up for your service? On a website? Through an API? Abraham On Wed, May 12, 2010 at 12:45, Michael Cameron darx...@gmail.com wrote: After Reading many of the OAUTH things, i noticed that the user has to do the login no matter what. We have a service on a server that logins into a Twitter account and sends direct messages to following users. we are currently using basic and trying to upgrade to oauth. but want it to be seamless. Is there a way to pass key info to login as the twitter account and send messages like we are already doing? without the need to login and authorize ? or did i miss something, any comments or links to things to read that i may have missed would be appreciated thanks! -- Abraham Williams | Developer for hire |http://abrah.am @abraham |http://projects.abrah.am|http://blog.abrah.am This email is: [ ] shareable [x] ask first [ ] private.- Hide quoted text - - Show quoted text -
[twitter-dev] Re: How to filter out utf-8 characters in java
Hi giustin, I don't think it's the same issue since yours is more PHP specific. My guess is that the PHP library in question or the code you're using to process the results is incorrectly converting between UTF-8 and ISO-8859-1 [1]. Maybe someone on the list with some more PHP knowledge can suggest a fix. Thanks; — Matt Sanford / @mzsanford [1] = The UTF-8 encoding of ã is two bytes. When those same two bytes are interpreted as ISO-8859-1 (a.k.a ISO-Latin-1) they are interpreted as two characters, like so (fixed width font required): UTF-8 Bytes vs. Same bytes in ISO-8859-1 n 0x6E n ã 0xC3 à 0xA3 £ o 0x6F o On May 12, 7:19 pm, giustin tgiu...@gmail.com wrote: I have similar problems. When I try to search using the tag não the result is não. The API that I used were Twitter Search API from Ryan Faerman (http:// ryanfaerman.com/twittersearch/) Regards. On 12 maio, 21:47, Matt Sanford m...@twitter.com wrote: Hi there, All characters in Tweets are utf-8. I'm assuming you're looking for something specific like accents or ASCII-art punctuation. Can you describe your problem in a little more detail? I might be able to help once I know what you're trying to prevent. Thanks; — Matt Sanford / @mzsanford On May 12, 4:21 pm, adamjamesdrew theikl...@gmail.com wrote: any ideas?
[twitter-dev] [OT] new ssl-cert for twitter.com?
hello, sorry for being offtopic, didnt know where else to ask. (please feel free to point to other resources) my maybe-problem: i got a knew ssl-cert from twitter.com today, which looks suspicious to me, but i am not sure. the cert data is as follows: --- CN: twitter.com O: twitter.com OU: GT09721236 serial number: 0B:B5:F1 CN: equifax O: equifax OU: -empty- issue date: 26.05.2009 valid until: 28.05.2010 sha1: 9e:e9:97:20:1b:d2:17:cb:cc:0c:8f:19:42:75:2d:6b:ac:07:e1:93 md5: 78:fd:97:3e:78:a1:f6:40:9e:66:7b:d3:a9:db:c2 --- i am unsure about its validity because of the very short validity date around two weeks, and because my firefox now shows the twitter.com page as 'completly encrypted' which was 'encrypted with cleartext parts' until now. can anyone confirm if this is a valid cert from twitter.com or if something fishy is going on? ~
[twitter-dev] Re: Streaming API OAuth explanation?
I am writing my own c++ based OAuth library. I know there is liboauth but I like to do things myself to learn. Anyhow I am trying to access http://stream.twitter.com/1/statuses/sample.xml and I keep getting 401. I have verified pretty much every parameter, and used the tool on http://hueniverse.com/2008/10/beginners-guide-to-oauth-part-iv-signing-requests/ to verify my signature is correct. I used twurl to obtain the user access tokens to my account. After doing some reading I'm no longer convinced that the streaming server even supports oauth. can you fill me in on the current status of stream.twitter.com and oauth? thanks! Lucas On Apr 20, 11:02 pm, Jonathon Hill jhill9...@gmail.com wrote: Thanks Taylor for the very detailed and helpful response! Jonathon On Apr 20, 1:17 pm, Taylor Singletary taylorsinglet...@twitter.com wrote: Hi Jonathon, ForStreamingAPI access that isn't from the perspective of a user's account, you would use two-leggedOAuthto establish authentication instead of basic auth. A two-leggedOAuthrequest is very similar to otherOAuthrequests: you have a specific resource you are trying to access, you have some parameters you want to pass to that resource, and you have anOAuthconsumer key andOAuth consumer secret. Which is unlike three-leggedOAuthwhere you also have oauth_tokens representing either a user/access_token or a request token in addition to the rest. But the rules remain the same. You take all theOAuthparameters and the parameters you are sending to the resource, organize them, build a signature base string, then sign that with your consumer secret and send the request on to Twitter properly signed. The only difference is that there is no oauth_token and oauth_token_secret getting involved in the mix. This is essentially what a two-legged request to thestreamingAPI would look like: Signature Base String GEThttp%3A%2F%2Fstream.twitter.com %2F1%2Fstatuses%2Fsample.jsonoauth_consumer_key%3Dri8JxYK2zzwSV5xIUfNNvQ%26oauth_nonce%3DSJJqJPdaZrYuIogToapS6ueJRyWB4Rs2ox4HEbu4nW8%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1271783743%26oauth_version%3D1.0 Signature Xi5jfuw2XqtU5KpNX9ZCtTptJS0= Authorization Header OAuthoauth_nonce=SJJqJPdaZrYuIogToapS6ueJRyWB4Rs2ox4HEbu4nW8, oauth_signature_method=HMAC-SHA1, oauth_timestamp=1271783743, oauth_consumer_key=ri8JxYK2zzwSV5xIUfNNvQ, oauth_signature=Xi5jfuw2XqtU5KpNX9ZCtTptJS0%3D, oauth_version=1.0 Taylor Singletary Developer Advocate, Twitterhttp://twitter.com/episod On Tue, Apr 20, 2010 at 10:05 AM, Jonathon Hill jhill9...@gmail.com wrote: One thing I meant to find out @chirp last week--what willoauthlook like for theStreamingAPI? I'm having a hard time visualizing how that will work. Thanks, Jonathon Hill @compwright Company52 http://company52.com -- Subscription settings: http://groups.google.com/group/twitter-development-talk/subscribe?hl=en
Re: [twitter-dev] Re: Streaming API OAuth explanation?
OAuth is not enabled on stream.twitter.com. You can try on chirpstream.twitter.com. On Thu, May 13, 2010 at 10:53 AM, Lucas Vickers lucasvick...@gmail.com wrote: I am writing my own c++ based OAuth library. I know there is liboauth but I like to do things myself to learn. Anyhow I am trying to access http://stream.twitter.com/1/statuses/sample.xml and I keep getting 401. I have verified pretty much every parameter, and used the tool on http://hueniverse.com/2008/10/beginners-guide-to-oauth-part-iv-signing-requests/ to verify my signature is correct. I used twurl to obtain the user access tokens to my account. After doing some reading I'm no longer convinced that the streaming server even supports oauth. can you fill me in on the current status of stream.twitter.com and oauth? thanks! Lucas On Apr 20, 11:02 pm, Jonathon Hill jhill9...@gmail.com wrote: Thanks Taylor for the very detailed and helpful response! Jonathon On Apr 20, 1:17 pm, Taylor Singletary taylorsinglet...@twitter.com wrote: Hi Jonathon, ForStreamingAPI access that isn't from the perspective of a user's account, you would use two-leggedOAuthto establish authentication instead of basic auth. A two-leggedOAuthrequest is very similar to otherOAuthrequests: you have a specific resource you are trying to access, you have some parameters you want to pass to that resource, and you have anOAuthconsumer key andOAuth consumer secret. Which is unlike three-leggedOAuthwhere you also have oauth_tokens representing either a user/access_token or a request token in addition to the rest. But the rules remain the same. You take all theOAuthparameters and the parameters you are sending to the resource, organize them, build a signature base string, then sign that with your consumer secret and send the request on to Twitter properly signed. The only difference is that there is no oauth_token and oauth_token_secret getting involved in the mix. This is essentially what a two-legged request to thestreamingAPI would look like: Signature Base String GEThttp%3A%2F%2Fstream.twitter.com %2F1%2Fstatuses%2Fsample.jsonoauth_consumer_key%3Dri8JxYK2zzwSV5xIUfNNvQ%26oauth_nonce%3DSJJqJPdaZrYuIogToapS6ueJRyWB4Rs2ox4HEbu4nW8%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1271783743%26oauth_version%3D1.0 Signature Xi5jfuw2XqtU5KpNX9ZCtTptJS0= Authorization Header OAuthoauth_nonce=SJJqJPdaZrYuIogToapS6ueJRyWB4Rs2ox4HEbu4nW8, oauth_signature_method=HMAC-SHA1, oauth_timestamp=1271783743, oauth_consumer_key=ri8JxYK2zzwSV5xIUfNNvQ, oauth_signature=Xi5jfuw2XqtU5KpNX9ZCtTptJS0%3D, oauth_version=1.0 Taylor Singletary Developer Advocate, Twitterhttp://twitter.com/episod On Tue, Apr 20, 2010 at 10:05 AM, Jonathon Hill jhill9...@gmail.com wrote: One thing I meant to find out @chirp last week--what willoauthlook like for theStreamingAPI? I'm having a hard time visualizing how that will work. Thanks, Jonathon Hill @compwright Company52 http://company52.com -- Subscription settings: http://groups.google.com/group/twitter-development-talk/subscribe?hl=en
[twitter-dev] UPDATE: High latency and spurious 401s with the Twitter REST API
Hi Developers, Just wanted to send you all an update that we're still working with gusto on the performance problems you've been encountering (thanks for all the helpful reports!) This week and next we're making a number of calculated modifications that should help ease the issues while we simultaneously investigate and improve other elements of the growing Twitter infrastructure. In the meantime, you'll see requests continuing to take longer than they should (instead of timing out) and you may see 401 Unauthenticated responses for otherwise valid authorized requests. When you encounter this kind of behavior, it's best not to immediately retry requests but instead to back off for 5s or so before retrying a request again. Thank you for your continued patience while we work through these issues; improvements are on the near horizon! Taylor Singletary Developer Advocate, Twitter http://twitter.com/episod
Re: [twitter-dev] Re: Streaming API OAuth explanation?
Excellent, it works! thanks On Thu, May 13, 2010 at 2:11 PM, John Kalucki j...@twitter.com wrote: OAuth is not enabled on stream.twitter.com. You can try on chirpstream.twitter.com. On Thu, May 13, 2010 at 10:53 AM, Lucas Vickers lucasvick...@gmail.com wrote: I am writing my own c++ based OAuth library. I know there is liboauth but I like to do things myself to learn. Anyhow I am trying to access http://stream.twitter.com/1/statuses/sample.xml and I keep getting 401. I have verified pretty much every parameter, and used the tool on http://hueniverse.com/2008/10/beginners-guide-to-oauth-part-iv-signing-requests/ to verify my signature is correct. I used twurl to obtain the user access tokens to my account. After doing some reading I'm no longer convinced that the streaming server even supports oauth. can you fill me in on the current status of stream.twitter.com and oauth? thanks! Lucas On Apr 20, 11:02 pm, Jonathon Hill jhill9...@gmail.com wrote: Thanks Taylor for the very detailed and helpful response! Jonathon On Apr 20, 1:17 pm, Taylor Singletary taylorsinglet...@twitter.com wrote: Hi Jonathon, ForStreamingAPI access that isn't from the perspective of a user's account, you would use two-leggedOAuthto establish authentication instead of basic auth. A two-leggedOAuthrequest is very similar to otherOAuthrequests: you have a specific resource you are trying to access, you have some parameters you want to pass to that resource, and you have anOAuthconsumer key andOAuth consumer secret. Which is unlike three-leggedOAuthwhere you also have oauth_tokens representing either a user/access_token or a request token in addition to the rest. But the rules remain the same. You take all theOAuthparameters and the parameters you are sending to the resource, organize them, build a signature base string, then sign that with your consumer secret and send the request on to Twitter properly signed. The only difference is that there is no oauth_token and oauth_token_secret getting involved in the mix. This is essentially what a two-legged request to thestreamingAPI would look like: Signature Base String GEThttp%3A%2F%2Fstream.twitter.com %2F1%2Fstatuses%2Fsample.jsonoauth_consumer_key%3Dri8JxYK2zzwSV5xIUfNNvQ%26oauth_nonce%3DSJJqJPdaZrYuIogToapS6ueJRyWB4Rs2ox4HEbu4nW8%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1271783743%26oauth_version%3D1.0 Signature Xi5jfuw2XqtU5KpNX9ZCtTptJS0= Authorization Header OAuthoauth_nonce=SJJqJPdaZrYuIogToapS6ueJRyWB4Rs2ox4HEbu4nW8, oauth_signature_method=HMAC-SHA1, oauth_timestamp=1271783743, oauth_consumer_key=ri8JxYK2zzwSV5xIUfNNvQ, oauth_signature=Xi5jfuw2XqtU5KpNX9ZCtTptJS0%3D, oauth_version=1.0 Taylor Singletary Developer Advocate, Twitterhttp://twitter.com/episod On Tue, Apr 20, 2010 at 10:05 AM, Jonathon Hill jhill9...@gmail.com wrote: One thing I meant to find out @chirp last week--what willoauthlook like for theStreamingAPI? I'm having a hard time visualizing how that will work. Thanks, Jonathon Hill @compwright Company52 http://company52.com -- Subscription settings: http://groups.google.com/group/twitter-development-talk/subscribe?hl=en
Re: [twitter-dev] [OT] new ssl-cert for twitter.com?
On Thu, May 13, 2010 at 10:37 AM, kuhkatz kuhk...@googlemail.com wrote: i got a knew ssl-cert from twitter.com today, which looks suspicious to me, but i am not sure. issue date: 26.05.2009 valid until: 28.05.2010 The twitter.com cert, as assigned by Equifax/RapidSSL is about to expire and we are going to upgrade (in the next day or two) to a Verisign Class 3 EV Cert for twitter.com. On api.twitter.com, the cert will expire on July 26th, and we are upgrading that certificate as well. We are also deprecating the use of SSLv2 and will remove that cipher from our supported cipher list, asking anyone who connects via SSL to use SSLv3 or TLS. i am unsure about its validity because of the very short validity date around two weeks, and because my firefox now shows the twitter.com page as 'completly encrypted' which was 'encrypted with cleartext parts' until now. can anyone confirm if this is a valid cert from twitter.com or if something fishy is going on? It's valid, for the next couple of weeks. -john -- John Adams Twitter Operations
Re: [twitter-dev] Re: How to filter out utf-8 characters in java
PHP treats strings as c strings basically (char/byte arrays). It won't really do anything special automagically and leaves it up to you to make sure you treat your strings safely. Make sure your code is encoded in utf-8 and make sure your content types are set to UTF-8 in your responses. Use UTF-8 wherever you can in your dbs and use utf8_encode/decode and the mb functions replacements where you can't. If you are making http requests mark your encodings in your requests correctly (with CURL set your charset to UTF-8 in your request headers). In java, all strings are high level representations of chars (internally UCS2 wide chars but you don't need to worry about that). You just need to make sure you decode/encode properly and mark your charsets in your requests and responses everywhere. Zac Sent from my iPad On May 13, 2010, at 10:51 AM, Matt Sanford m...@twitter.com wrote: Hi giustin, I don't think it's the same issue since yours is more PHP specific. My guess is that the PHP library in question or the code you're using to process the results is incorrectly converting between UTF-8 and ISO-8859-1 [1]. Maybe someone on the list with some more PHP knowledge can suggest a fix. Thanks; — Matt Sanford / @mzsanford [1] = The UTF-8 encoding of ã is two bytes. When those same two bytes are interpreted as ISO-8859-1 (a.k.a ISO-Latin-1) they are interpreted as two characters, like so (fixed width font required): UTF-8 Bytes vs. Same bytes in ISO-8859-1 n 0x6E n ã 0xC3 à 0xA3 £ o 0x6F o On May 12, 7:19 pm, giustin tgiu...@gmail.com wrote: I have similar problems. When I try to search using the tag não the result is não. The API that I used were Twitter Search API from Ryan Faerman (http:// ryanfaerman.com/twittersearch/) Regards. On 12 maio, 21:47, Matt Sanford m...@twitter.com wrote: Hi there, All characters in Tweets are utf-8. I'm assuming you're looking for something specific like accents or ASCII-art punctuation. Can you describe your problem in a little more detail? I might be able to help once I know what you're trying to prevent. Thanks; — Matt Sanford / @mzsanford On May 12, 4:21 pm, adamjamesdrew theikl...@gmail.com wrote: any ideas?
[twitter-dev] parsing out entities from tweets (a.k.a. parsing out hashtags is hard!)
tweet text can potentially mention other users, lists, contain URLs, and contain hashtags -- in fact, something like 50% of tweets contain at least one of those. developers who want to understand the tweet text have to parse the text to try to extract those entities (which can get really hard and difficult when dealing with unicode characters) and then have to potentially make another REST call to resolve that data. matt sanford (@mzsanford) on our internationalization team released the twitter-text library (http://github.com/mzsanford/twitter-text-rb) to help making parsing easier and standardized (in fact, we use this library ourselves), but we on the Platform team wondered if we could make this even easier for our developers. as part of our JSON and XML payloads, we are going to start supporting an entities attribute that will contain this parsed and structured data. you'll see it like so: { text : hey @raffi tell @noradio to check out http://dev.twitter.com#hot;, ... entities : { user_mentions : [ { id : 8285392, screen_name : raffi, indices : [4, 9] }, { id : 3191321, screen_name : noradio, indices : [16, 23] } ], urls : [ { url : http://dev.twitter.com;, indices : [38, 64] }, ], hashtags : [ { text : #hot, indices : [66, 69] url : http://search.twitter.com/search?q=%23hot; } ] } ... } or like so status texthey @raffi tell @noradio to check out http://dev.twitter.com#hot/text ... entities user_mentions user_mention start=4 end=9 id8285392/id screen_nameraffi/screen_name /user_mention user_mention start=16 end=23 id3191321/id screen_namenoradio/screen_name /user_mention /user_mentions urls url start=38 end=64 urlhttp://dev.twitter.com/url /url /urls hashtags hashtag start=66 end=69 text#hot/text urlhttp://search.twitter.com/search?q=%23hot/url /hashtag /hashtags /entities ... /status as shown above, we'll be parsing out all mentioned users, all lists, all included URLs, and all hashtags. in the case of users, we'll provide you their user ID, and for hashtags we'll provide you the query you can run against the search API. and, for all of them, we'll also tell you at what character count the entity starts and stops -- that should really take the burden off you guys to parse the text properly. this entities block will probably be extended later, and these entities are just the start. have we missed anything? is there anything else you would like to see? as always - just drop us a note, and look for these entities to start slowly rolling out. -- Raffi Krikorian Twitter Platform Team http://twitter.com/raffi
[twitter-dev] Re: Announcing Twurl: OAuth-enabled curl for the Twitter API
Scott, Nate: I got it to work with a minor adjustment on Ubuntu 10.04. I did apt-get install rake rubygems libopenssl-ruby gem install oauth gem install rr gem install require_all git clone http://github.com/marcel/twurl.git apply this diff: http://gist.github.com/400489 rake dist:gem gem install pkg/twurl-*.gem You're set.
[twitter-dev] Re: Why have I recieved a HTTP 601 Response.
yes, my proxy located in south korea. and every sigle try to authoization are disconnected. On May 10, 2:13 am, Raffi Krikorian ra...@twitter.com wrote: i'm not sure - how long do you see the connection hang before the disconnect occurs? how frequently do you see this issue? where is your proxy geographically located? On Mon, May 10, 2010 at 4:34 AM, Asura hyuckmin.k...@gmail.com wrote: hi, Actually, I'm connecting through a proxy. But, they saied that we just send HTTP 601 message cause twitter disconnects. when do you disconnect with client while authorize? your kind comment would be much appreciated. Thanks. Regards, H. On May 7, 2:42 pm, Raffi Krikorian ra...@twitter.com wrote: hi! are you connecting through a proxy or some other intermediary? that failure doesn't seem like it came from the twitter stack. On Fri, May 7, 2010 at 10:10 AM, Asura hyuckmin.k...@gmail.com wrote: I have some Twitter login problem with my Polaris 6.2 Mobile Browser on handset device. I’ve been trying to figure it out. But I haven’t found out a problem, I really need you guys's answer for that. Currently, I use the IE user agent string for compatibility. I’ve attached some transaction log. Please let me know, if you guys need more information. I’m looking forward to your hopeful response. Thank you. ----- POSThttp://twitter.com/oauth/authorizeHTTP/1.1 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/ vnd.ms-powerpoint, application/msword, */* Accept-Language: ko Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0); 800*480;POLARIS 6.100;em1.0;01057407732 Host: twitter.com Connection: Keep-Alive Referer: http://twitter.com/oauth/authorize?oauth_token=QQCGC4jstIj1LN73LZxuh2. .. Proxy-Authorization: Basic OTcyMjQ5NjEwNTp2enc= Cookie: guest_id=127181804004115551; original_referer=LQtHfb3aVLhzTQteZqBtMsK1SG1k6PabMrGGFzkb8SWvN4rcMar6PByaoAj77FrM0MzwLyUG00BPri2ivfClbpZqqFy5G5VDpU5n; auth_token=; _twitter_sess=BAh7CzoPY3JlYXRlZF9hdGwrCKpp52FRh4oAToOcmV0dXJuX3RvIl5odHRwOi8vv50AdHdpdHRlci5jb20vb2F1dGgvYXV0aG9yaXplP29hdXRoX3Rva2VuPVFRQ0dDD50ANGpzdElqMUxONzNMWnh1aDJKaEtFYWVvaWZGN1hmTVNIalpSWToRdHJhbnNff50AcHJvbXB0MDoMY3NyZl9pZCIlYmRiMzYzNWJjZWQ0MjYyZjc4ZDZmODViZTUyy50ANjhiZGM6B2lkIiUxYjg2NmE0OTliNjI0NDljNWUwMTc5Yjg1MWU1YmU1YiIKK50AZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsAA50ABjoKQHVzZWR7AAA53DD53D-- c2404da8c9fd8ee2a8738deeb9f7b77d49ee0c7d; __utmz=43838368.1271818261.2.2.utmcsr=browser.lgtelecom.com| utmccn=(referral)|utmcmd=referral|utmcct=/svc_twitter/fb/width/prg/ information_1.htm; __utma=43838368.114323.1271818047.1271818047.1271818261.2; __utmc=43838368; __utmv=43838368.langgAA0en; __utmb=43838368.4.10.1271818261 Content-Type: application/x-www-form-urlencoded Content-Length: 186 authenticity_token=8e936e0758e27e3bfd5dfba85e62ee418d045f6foauth_token=QQCGC4jstIj1LN73LZxuh2JhKEaeoifF7XfMSHjZRYsessionnBusername_or_emaillD=minbg717sessionnBpassworddD=m20062445 ------ HTTP/1.1 601 Connect Fail Connection: close Content-Length: 55 HTMLBODYConnecting to WEB Server Fail/BODY/HTML -- Raffi Krikorian Twitter Platform Teamhttp://twitter.com/raffi-Hide quoted text - - Show quoted text - -- Raffi Krikorian Twitter Platform Teamhttp://twitter.com/raffi- Hide quoted text - - Show quoted text -
[twitter-dev] Re: parsing out entities from tweets (a.k.a. parsing out hashtags is hard!)
Raffi, This follows on nicely from the presentation at Warblecamp last week discussing how difficult it is to do this right, and I think a consistent approach across all clients (including twitter.com, mobile.twitter, and 3rd party apps) should be priority number 1. However looking at your example: On May 13, 10:25 pm, Raffi Krikorian ra...@twitter.com wrote: { text : hey @raffi tell @noradio to check out http://dev.twitter.com#hot;, snip { url : http://dev.twitter.com;, indices : [38, 64] }, ], hashtags : [ { text : #hot, indices : [66, 69] url : http://search.twitter.com/search?q=%23hot; } ] } Without looking at how twitter.com would currently handle that example, I would have expected the url to be http://dev.twitter.com/ #hot and for the tweet to contain no hashtag. If the hashtag always takes precedence I'd have no way to link to the following without using a URL shortener: http://oauth.net/core/1.0a/#anchor41 -- Glenn Gillen http://glenngillen.com/
Re: [twitter-dev] Re: Malformed XML in some Atom feeds...
FYI, it looks like the stray ampersands are still floating around in the feeds of some Twitter lists. Still causes validation errors. Maybe the bug fix is propagating throughout Twitter? While we wait for this to be resolved, this regex might help any developer who wants things to work on their end. (Here's the version I'm using in PHP.) // Look for dangling characters and turn them into amp; entities. $output = preg_replace(/(?!#?\w+;)/, amp;, $output); Cheers, Brandon On Wed, May 12, 2010 at 8:37 AM, Brandon Stone st...@lbstone.com wrote: From what I can see, it looks like this is fixed now. Thanks! -Brandon On Mon, May 10, 2010 at 9:46 AM, Taylor Singletary taylorsinglet...@twitter.com wrote: Hi Claudia, Looks like I was mistaken and this bugfix hasn't hit the server yet. It should go out sometime early this week. Taylor Singletary Developer Advocate, Twitter http://twitter.com/episod On Mon, May 10, 2010 at 4:15 AM, Claudia A. V. Callegari claudia.avcalleg...@gmail.com wrote: Hello ! Thanks for the feedback. See, for example, the url that my application is using: http://twitter.com/statuses/user_timeline.atom?page=1user_id=54210117count=200since_id=12941651260 Thanks Claudia Antonini Vitiello Callegari São Paulo - Brasil On 7 maio, 11:00, Taylor Singletary taylorsinglet...@twitter.com wrote: Hi Claudia, Could you paste a little bit of the invalid ATOM feed you are still receiving it? This problem should be fixed now, but it's possible that some persistent cache elements may still have the unencoded ampersand within them. Taylor Singletary Developer Advocate, Twitterhttp://twitter.com/episod On Fri, May 7, 2010 at 3:57 AM, Claudia A. V. Callegari claudia.avcalleg...@gmail.com wrote: Hello! Sorry for my English. I'm also having the same problem, has agumar forecast for this problem? Thanks Claudia Antonini Vitiello Callegari São Paulo - Brasil On 4 maio, 12:33, Taylor Singletary taylorsinglet...@twitter.com wrote: Hi Brandon, Thanks for the bug report. We'll work on getting this fixed quickly. Thanks! Taylor Singletary Developer Advocate, Twitterhttp://twitter.com/episod On Tue, May 4, 2010 at 7:54 AM, Brandon Stone st...@lbstone.com wrote: One very popular Twitter list is Scoble's Tech News Brands list: http://api.twitter.com/1/Scobleizer/lists/tech-news-brands/statuses.a. .. I've got a program that's been watching this feed for a while now. Just yesterday I started getting some XML parsing errors. I can create a hack to make this work again on my end, but it's definitely best for Twitter to make sure their XML is well-formed. Here's what feed validator says: http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fapi.twitter.c. .. Sorry This feed does not validate. line 482 http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fapi.twitter.c.. ., column 73: XML parsing error: unknown:482:73: not well-formed (invalid token) [help http://validator.w3.org/feed/docs/error/SAXError.html] a href= http://www.google.com/support/youtube/bin/answer.py?hl=enanswer=16. .. It looks like whenever a twitter:source of Google appears, it breaks the XML because of the ampersand in the URL: twitter:source a href= http://www.google.com/support/youtube/bin/answer.py?hl=enanswer=164577; rel=nofollowGoogle/a /twitter:source If the ampersand is fixed, I'm guessing things will be happy again. I hope I'm sending this to the right place. Not sure where else to send it. Thanks! -Brandon -- Brandon Stone http://brandonstone.com http://twitter.com/LBStone -- Brandon Stone http://brandonstone.com http://twitter.com/LBStone -- Brandon Stone http://brandonstone.com http://twitter.com/LBStone
Re: [twitter-dev] parsing out entities from tweets (a.k.a. parsing out hashtags is hard!)
On Thursday, May 13, 2010 02:25:27 pm Raffi Krikorian wrote: tweet text can potentially mention other users, lists, contain URLs, and contain hashtags -- in fact, something like 50% of tweets contain at least one of those. developers who want to understand the tweet text have to parse the text to try to extract those entities (which can get really hard and difficult when dealing with unicode characters) and then have to potentially make another REST call to resolve that data. matt sanford (@mzsanford) on our internationalization team released the twitter-text library (http://github.com/mzsanford/twitter-text-rb) to help making parsing easier and standardized (in fact, we use this library ourselves), but we on the Platform team wondered if we could make this even easier for our developers. as part of our JSON and XML payloads, we are going to start supporting an entities attribute that will contain this parsed and structured data. you'll see it like so: { text : hey @raffi tell @noradio to check out http://dev.twitter.com#hot;, ... entities : { user_mentions : [ { id : 8285392, screen_name : raffi, indices : [4, 9] }, { id : 3191321, screen_name : noradio, indices : [16, 23] } ], urls : [ { url : http://dev.twitter.com;, indices : [38, 64] }, ], hashtags : [ { text : #hot, indices : [66, 69] url : http://search.twitter.com/search?q=%23hot; } ] } ... } or like so status texthey @raffi tell @noradio to check out http://dev.twitter.com#hot/text ... entities user_mentions user_mention start=4 end=9 id8285392/id screen_nameraffi/screen_name /user_mention user_mention start=16 end=23 id3191321/id screen_namenoradio/screen_name /user_mention /user_mentions urls url start=38 end=64 urlhttp://dev.twitter.com/url /url /urls hashtags hashtag start=66 end=69 text#hot/text urlhttp://search.twitter.com/search?q=%23hot/url /hashtag /hashtags /entities ... /status as shown above, we'll be parsing out all mentioned users, all lists, all included URLs, and all hashtags. in the case of users, we'll provide you their user ID, and for hashtags we'll provide you the query you can run against the search API. and, for all of them, we'll also tell you at what character count the entity starts and stops -- that should really take the burden off you guys to parse the text properly. this entities block will probably be extended later, and these entities are just the start. have we missed anything? is there anything else you would like to see? as always - just drop us a note, and look for these entities to start slowly rolling out. That's awesome! Saves me hours of run-time regex grief! I wrote a Perl script a while back to do some of this. One question - do people often tweet email addresses? My Perl script was intended to be a pre-processor for input to PostgreSQL, and the PostgreSQL lexer recognizes email addresses. So I put in code to recognize those too. But I rarely see email addresses in tweets. -- M. Edward (Ed) Borasky http://borasky-research.net/m-edward-ed-borasky/ @znmeb A mathematician is a device for turning coffee into theorems. ~ Paul Erdős
RE: [twitter-dev] parsing out entities from tweets (a.k.a. parsing out hashtags is hard!)
Raffi, I have noticed that the API sometimes returns user ID's that are out of sync with username. I think one case is where a Alice retweets Bob's tweet, and then Bob changes his name to Charlie. When I try to reply to it, it doesn't show up as in reply to to original tweet because the reply contains @Bob instead of @Charlie. It would actually get confusing because a new user could sign up as Bob and kind of take over Charlie's old @mentions that contain @bob. Is this change an attempt to address that, by fixing the screen_name-userid mapping at the time a tweet is created? When we post tweets that include @mentions, can we include our own entities/user_mentions in our request body, so that Twitter can notify us if one of the mentioned screen names has a different userid than what we were expecting and/or one of the mentioned screen names is not a valid screen name anymore? That would be extremely helpful in dealing with this edge case-even if it was subject to some race conditions over a narrow period of time. entities/user_mentions/screen_name and entities/user_mentions/text are redundant. I would rather just pick the text out of the tweet using original tweet text indexed by the indices property, to save bandwidth. Regards, Brian Raffi Krikorian wrote: As part of our JSON and XML payloads, we are going to start supporting an entities attribute that will contain this parsed and structured data. you'll see it like so: { text : hey @raffi tell @noradio to check out http://dev.twitter.com #hot, ... entities : { user_mentions : [ { id : 8285392, screen_name : raffi, indices : [4, 9] }, { id : 3191321, screen_name : noradio, indices : [16, 23] } ], urls : [ { url : http://dev.twitter.com;, indices : [38, 64] }, ], hashtags : [ { text : #hot, indices : [66, 69] url : http://search.twitter.com/search?q=%23hot; } ] } ... } as shown above, we'll be parsing out all mentioned users, all lists, all included URLs, and all hashtags. in the case of users, we'll provide you their user ID, and for hashtags we'll provide you the query you can run against the search API. and, for all of them, we'll also tell you at what character count the entity starts and stops -- that should really take the burden off you guys to parse the text properly. this entities block will probably be extended later, and these entities are just the start. have we missed anything? is there anything else you would like to see? as always - just drop us a note, and look for these entities to start slowly rolling out.
RE: [twitter-dev] Re: parsing out entities from tweets (a.k.a. parsing out hashtags is hard!)
Glenn Gillen wrote: Without looking at how twitter.com would currently handle that example, I would have expected the url to be http://dev.twitter.com/ #hot and for the tweet to contain no hashtag. If the hashtag always takes precedence I'd have no way to link to the following without using a URL shortener: http://oauth.net/core/1.0a/#anchor41 I think you are overlooking the space between the last slash and #hot. URLs cannot contain (un-encoded) spaces. Regards, Brian
Re: [twitter-dev] Re: parsing out entities from tweets (a.k.a. parsing out hashtags is hard!)
hey glenn. i think something went wrong in the copy and paste -- there should have been a space between the URL and the hashtag. On Thu, May 13, 2010 at 11:02 PM, glenn gillen gl...@rubypond.com wrote: Raffi, This follows on nicely from the presentation at Warblecamp last week discussing how difficult it is to do this right, and I think a consistent approach across all clients (including twitter.com, mobile.twitter, and 3rd party apps) should be priority number 1. However looking at your example: On May 13, 10:25 pm, Raffi Krikorian ra...@twitter.com wrote: { text : hey @raffi tell @noradio to check out http://dev.twitter.com#hot;, snip { url : http://dev.twitter.com;, indices : [38, 64] }, ], hashtags : [ { text : #hot, indices : [66, 69] url : http://search.twitter.com/search?q=%23hot; } ] } Without looking at how twitter.com would currently handle that example, I would have expected the url to be http://dev.twitter.com/ #hot and for the tweet to contain no hashtag. If the hashtag always takes precedence I'd have no way to link to the following without using a URL shortener: http://oauth.net/core/1.0a/#anchor41 -- Glenn Gillen http://glenngillen.com/ -- Raffi Krikorian Twitter Platform Team http://twitter.com/raffi
Re: [twitter-dev] parsing out entities from tweets (a.k.a. parsing out hashtags is hard!)
I have noticed that the API sometimes returns user ID’s that are out of sync with username. I think one case is where a Alice retweets Bob’s tweet, and then Bob changes his name to Charlie. When I try to reply to it, it doesn’t show up as “in reply to” to original tweet because the reply contains �...@bob” instead of �...@charlie”. It would actually get confusing because a new user could sign up as Bob and kind of “take over” Charlie’s old @mentions that contain �...@bob”. Is this change an attempt to address that, by fixing the screen_name-userid mapping at the time a tweet is created? i haven't thought about that. perhaps we could make that so. i need to investigate that. When we post tweets that include @mentions, can we include our own entities/user_mentions in our request body, so that Twitter can notify us if one of the mentioned screen names has a different userid than what we were expecting and/or one of the mentioned screen names is not a valid screen name anymore? That would be extremely helpful in dealing with this edge case—even if it was subject to some race conditions over a narrow period of time. again - great idea. can't guarantee anything, but let me think about it. probably not at the beginning, but this is a good idea. entities/user_mentions/screen_name and entities/user_mentions/text are redundant. I would rather just pick the text out of the tweet using original tweet text indexed by the indices property, to save bandwidth. in theory i like this. i'll probably send a follow up e-mail so that i can solicit other feedback. -- Raffi Krikorian Twitter Platform Team http://twitter.com/raffi
[twitter-dev] Re: parsing out entities from tweets (a.k.a. parsing out hashtags is hard!)
I can see the text inside some of the entities tag causing some developers some problems as it's the same tag name as the status. Of course all of us should be able to handle it, but just look what happened with the extra user id tag inside a status On May 13, 11:11 pm, Raffi Krikorian ra...@twitter.com wrote: hey glenn. i think something went wrong in the copy and paste -- there should have been a space between the URL and the hashtag. On Thu, May 13, 2010 at 11:02 PM, glenn gillen gl...@rubypond.com wrote: Raffi, This follows on nicely from the presentation at Warblecamp last week discussing how difficult it is to do this right, and I think a consistent approach across all clients (including twitter.com, mobile.twitter, and 3rd party apps) should be priority number 1. However looking at your example: On May 13, 10:25 pm, Raffi Krikorian ra...@twitter.com wrote: { text : hey @raffi tell @noradio to check out http://dev.twitter.com#hot;, snip { url : http://dev.twitter.com;, indices : [38, 64] }, ], hashtags : [ { text : #hot, indices : [66, 69] url : http://search.twitter.com/search?q=%23hot; } ] } Without looking at how twitter.com would currently handle that example, I would have expected the url to be http://dev.twitter.com/ #hot and for the tweet to contain no hashtag. If the hashtag always takes precedence I'd have no way to link to the following without using a URL shortener:http://oauth.net/core/1.0a/#anchor41 -- Glenn Gillen http://glenngillen.com/ -- Raffi Krikorian Twitter Platform Teamhttp://twitter.com/raffi
[twitter-dev] Re: parsing out entities from tweets (a.k.a. parsing out hashtags is hard!)
Raffi: On May 13, 2:25 pm, Raffi Krikorian ra...@twitter.com wrote: as shown above, we'll be parsing out all mentioned users, all lists, all included URLs, and all hashtags This is an interesting step forward. The internationalisation considerations can be sticky, though. I did some entity-parsing from tweets as part of my Twanguages project (a language census of Twitter). One discover was that people are in fact using hashtags with non-latin scripts. Another is that some people are using the '#' character without intending to create a hashtage (e.g. we are #2 in line). How will your entity parsing handle non-latin hashtags, latin- character hashtags with accented characters, and strings starting with '#' not intended as hashtags? Also note that URLs can now have non-Latin top-level domain names as well as second-level domain names and other path parts. For instance, http://وزارة-الأتصالات.مصر is a valid URL in the .مصر top-level domain. Will your entity parsing code handle such URLs? In any case, it would be very helpful if the platform team would document exactly what regular expressions govern the entities you recognise. I might not agree with your definition of hashtag syntax, but at least I want to know what it is. See for example the running questions on how to measure the length of a status message. matt sanford (@mzsanford) on our internationalization team released the twitter-text library (http://github.com/mzsanford/twitter-text-rb) to help making parsing easier and standardized (in fact, we use this library ourselves), but we on the Platform team wondered if we could make this even easier for our developers. ... I wasn't aware of this, and I'll take a look. Thank you for the tip! — Jim DeLaHunt, Vancouver, Canada
[twitter-dev] Re: parsing out entities from tweets (a.k.a. parsing out hashtags is hard!)
On May 13, 11:11 pm, Raffi Krikorian ra...@twitter.com wrote: hey glenn. i think something went wrong in the copy and paste -- there should have been a space between the URL and the hashtag. My bad. Back in my box then. Cheers, -- Glenn Gillen http://glenngillen.com/
[twitter-dev] Re: parsing out entities from tweets (a.k.a. parsing out hashtags is hard!)
Raffi, This is all good, but can you please make the inclusion in the tweet payload optional? Meaning, only include it if it is requested by an additional parameter? I, and I'm sure a lot of others, are already parsing the tweet text. This is just going to consume additional bandwidth and not add any value for us. It will add value for folks who are not already doing the parsing or don't know how. So, they can just request this additional payload.
[twitter-dev] Re: parsing out entities from tweets (a.k.a. parsing out hashtags is hard!)
+1 on the additional parameter to optionally request the data. Every byte counts for mobile device battery life and download time. --Naveen Ayyagari @knight9 On May 13, 8:13 pm, Dewald Pretorius dpr...@gmail.com wrote: Raffi, This is all good, but can you please make the inclusion in the tweet payload optional? Meaning, only include it if it is requested by an additional parameter? I, and I'm sure a lot of others, are already parsing the tweet text. This is just going to consume additional bandwidth and not add any value for us. It will add value for folks who are not already doing the parsing or don't know how. So, they can just request this additional payload.
[twitter-dev] Leveraging the Twitter API and scraping out tweets to only include tweets with links
I am working on a project for a client and I am looking into using the Twitter API to feed in tweets from those users who opt-in to have their twitter feed brought in. One thing that I wanted to do to customize the feed is to only show those tweets that have a link included. Does anyone have any details on how to do this and whether it's pretty straight-forward to do? I am not a developer. Thanks!
Re: [twitter-dev] parsing out entities from tweets (a.k.a. parsing out hashtags is hard!)
Hi Raffi, This is all very cool I'm really looking forward to this being generally available. Not sure if this would be possible/practical or not, but it would be *really* useful if short urls in a tweet could be resolved to long urls, and those included instead, or as well. For extra awesome, inclusion of the long url metadata like title content-type would be great. Having this data included would make the job of creating nice, friendly HTML links from the tweet trivial. Thanks, JB. On 14/05/10 7:25 AM, Raffi Krikorian wrote: tweet text can potentially mention other users, lists, contain URLs, and contain hashtags -- in fact, something like 50% of tweets contain at least one of those. developers who want to understand the tweet text have to parse the text to try to extract those entities (which can get really hard and difficult when dealing with unicode characters) and then have to potentially make another REST call to resolve that data. matt sanford (@mzsanford) on our internationalization team released the twitter-text library (http://github.com/mzsanford/twitter-text-rb) to help making parsing easier and standardized (in fact, we use this library ourselves), but we on the Platform team wondered if we could make this even easier for our developers. as part of our JSON and XML payloads, we are going to start supporting an entities attribute that will contain this parsed and structured data. you'll see it like so: { text : hey @raffi tell @noradio to check out http://dev.twitter.com #hot, ... entities : { user_mentions : [ { id : 8285392, screen_name : raffi, indices : [4, 9] }, { id : 3191321, screen_name : noradio, indices : [16, 23] } ], urls : [ { url : http://dev.twitter.com;, indices : [38, 64] }, ], hashtags : [ { text : #hot, indices : [66, 69] url : http://search.twitter.com/search?q=%23hot; } ] } ... } or like so status texthey @raffi tell @noradio to check out http://dev.twitter.com #hot/text ... entities user_mentions user_mention start=4 end=9 id8285392/id screen_nameraffi/screen_name /user_mention user_mention start=16 end=23 id3191321/id screen_namenoradio/screen_name /user_mention /user_mentions urls url start=38 end=64 urlhttp://dev.twitter.com/url /url /urls hashtags hashtag start=66 end=69 text#hot/text urlhttp://search.twitter.com/search?q=%23hot/url /hashtag /hashtags /entities ... /status as shown above, we'll be parsing out all mentioned users, all lists, all included URLs, and all hashtags. in the case of users, we'll provide you their user ID, and for hashtags we'll provide you the query you can run against the search API. and, for all of them, we'll also tell you at what character count the entity starts and stops -- that should really take the burden off you guys to parse the text properly. this entities block will probably be extended later, and these entities are just the start. have we missed anything? is there anything else you would like to see? as always - just drop us a note, and look for these entities to start slowly rolling out. -- Raffi Krikorian Twitter Platform Team http://twitter.com/raffi
[twitter-dev] Visualizing Tweets Over Time
Hey guys, I'm curious how you can get the number of tweets over time. For example, let's say I want to create a graph that charts how many times @ladygaga has been mentioned in the past 15 minutes, as opposed to @beyonce. And I'd want that graph to update every 15 minutes. Basically, I want to know how to create something like this: http://www.mtv.com/netstorage/mtvncorpstor.download.akamai.com/8620/radian6/ttl1m/app/snapshot I combed through the API Documentation, and I couldn't find the way to do it. But there's *got* to be a way. I also looked at all the different ways to do an Advanced Search (http://search.twitter.com/ advanced) and couldn't find a way to do that. I can definitely search for the number of times someone's been mentioned in the past X amount of time, but the number of results gets truncated. Ideally I'd just want to do something that gives me the following statistics: @ladygaga mentioned 295 times in the past 15 minutes. Does anyone know how to go about doing something like this? Thank you so much! N
[twitter-dev] Searching date limitations
This is one of those questions where I'm pretty sure I know the answer, but I'd really like to be wrong. :) There doesn't seem to be anyway to get tweets past ~7 days. Which sort of makes me wonder what the point of the since and until params are -- for the usages where only being able to search back 7 days makes sense, it seems like you'd want more granularity. So my deeper question is whether this is simply a matter of not being able to *store* all of the data (seems highly unlikely) or just not being able to adequately *serve* that data through an open http interface? It would be really nice for research purposes to be able to have access to that data...
[twitter-dev] Read/Unread field?
I'm not sure if this has been asked before, but I was wondering about the inclusion of a read/unread field included with a status. So many applications conduct their own methods of knowing whether a tweet has been read, but it would be really good if this could be unified on Twitter. I'm not completely sure how it would work, maybe have a new API function to set the read/unread status, and tweets seen on Twitter.com itself would never set this status, only applications would use this function. This is just an idea though, what do you think?
Re: [twitter-dev] parsing out entities from tweets (a.k.a. parsing out hashtags is hard!)
Which APIs will this apply to? Search, REST, Streaming, all of the above? On Thu, May 13, 2010 at 5:25 PM, Raffi Krikorian ra...@twitter.com wrote: tweet text can potentially mention other users, lists, contain URLs, and contain hashtags -- in fact, something like 50% of tweets contain at least one of those. developers who want to understand the tweet text have to parse the text to try to extract those entities (which can get really hard and difficult when dealing with unicode characters) and then have to potentially make another REST call to resolve that data. matt sanford (@mzsanford) on our internationalization team released the twitter-text library (http://github.com/mzsanford/twitter-text-rb) to help making parsing easier and standardized (in fact, we use this library ourselves), but we on the Platform team wondered if we could make this even easier for our developers. as part of our JSON and XML payloads, we are going to start supporting an entities attribute that will contain this parsed and structured data. you'll see it like so: { text : hey @raffi tell @noradio to check out http://dev.twitter.com #hot, ... entities : { user_mentions : [ { id : 8285392, screen_name : raffi, indices : [4, 9] }, { id : 3191321, screen_name : noradio, indices : [16, 23] } ], urls : [ { url : http://dev.twitter.com;, indices : [38, 64] }, ], hashtags : [ { text : #hot, indices : [66, 69] url : http://search.twitter.com/search?q=%23hot; } ] } ... } or like so status texthey @raffi tell @noradio to check out http://dev.twitter.com #hot/text ... entities user_mentions user_mention start=4 end=9 id8285392/id screen_nameraffi/screen_name /user_mention user_mention start=16 end=23 id3191321/id screen_namenoradio/screen_name /user_mention /user_mentions urls url start=38 end=64 urlhttp://dev.twitter.com/url /url /urls hashtags hashtag start=66 end=69 text#hot/text urlhttp://search.twitter.com/search?q=%23hot/url /hashtag /hashtags /entities ... /status as shown above, we'll be parsing out all mentioned users, all lists, all included URLs, and all hashtags. in the case of users, we'll provide you their user ID, and for hashtags we'll provide you the query you can run against the search API. and, for all of them, we'll also tell you at what character count the entity starts and stops -- that should really take the burden off you guys to parse the text properly. this entities block will probably be extended later, and these entities are just the start. have we missed anything? is there anything else you would like to see? as always - just drop us a note, and look for these entities to start slowly rolling out. -- Raffi Krikorian Twitter Platform Team http://twitter.com/raffi
Re: [twitter-dev] Visualizing Tweets Over Time
Grab the data via the Streaming API. Use the track parameter to collect mentions. Then, graph however you see fit. Don't use search -- it's not appropriate for automated repeated queries for data collection. -John Kalucki http://twitter.com/jkalucki Infrastructure, Twitter Inc. On Thu, May 13, 2010 at 3:26 PM, Nadya nadya@gmail.com wrote: Hey guys, I'm curious how you can get the number of tweets over time. For example, let's say I want to create a graph that charts how many times @ladygaga has been mentioned in the past 15 minutes, as opposed to @beyonce. And I'd want that graph to update every 15 minutes. Basically, I want to know how to create something like this: http://www.mtv.com/netstorage/mtvncorpstor.download.akamai.com/8620/radian6/ttl1m/app/snapshot I combed through the API Documentation, and I couldn't find the way to do it. But there's *got* to be a way. I also looked at all the different ways to do an Advanced Search (http://search.twitter.com/ advanced) and couldn't find a way to do that. I can definitely search for the number of times someone's been mentioned in the past X amount of time, but the number of results gets truncated. Ideally I'd just want to do something that gives me the following statistics: @ladygaga mentioned 295 times in the past 15 minutes. Does anyone know how to go about doing something like this? Thank you so much! N
[twitter-dev] Re: parsing out entities from tweets (a.k.a. parsing out hashtags is hard!)
Indeed, it would be great to see this is the preview of UserStreams :)
Re: [twitter-dev] Leveraging the Twitter API and scraping out tweets to only include tweets with links
You could just do a check to see if the status contains a http:// or https://. You might miss a few that don't include the protocol but it would be a pretty small amount. Abraham On Thu, May 13, 2010 at 15:15, Mrs. Tillman katlen.till...@gmail.comwrote: I am working on a project for a client and I am looking into using the Twitter API to feed in tweets from those users who opt-in to have their twitter feed brought in. One thing that I wanted to do to customize the feed is to only show those tweets that have a link included. Does anyone have any details on how to do this and whether it's pretty straight-forward to do? I am not a developer. Thanks! -- Abraham Williams | Developer for hire | http://abrah.am @abraham | http://projects.abrah.am | http://blog.abrah.am This email is: [ ] shareable [x] ask first [ ] private.
[twitter-dev] Re: parsing out entities from tweets (a.k.a. parsing out hashtags is hard!)
+1 for it being optional as well. Whilst I will probably use it, it's nice to be able to keep the bandwidth download to a minimum for scenarios where it's not needed On May 14, 1:52 am, Naveen Ayyagari nav...@getsocialscope.com wrote: +1 on the additional parameter to optionally request the data. Every byte counts for mobile device battery life and download time. --Naveen Ayyagari @knight9 On May 13, 8:13 pm, Dewald Pretorius dpr...@gmail.com wrote: Raffi, This is all good, but can you please make the inclusion in the tweet payload optional? Meaning, only include it if it is requested by an additional parameter? I, and I'm sure a lot of others, are already parsing the tweet text. This is just going to consume additional bandwidth and not add any value for us. It will add value for folks who are not already doing the parsing or don't know how. So, they can just request this additional payload.