[twitter-dev] tmhOAuth callbacks interrupts
Hi, All! I have a problem with thmhOAuth. Here is the code, it is like an example from https://github.com/themattharris/tmhOAuth: --- require_once(config.php); require_once(tmhOAuth.php); require_once(functions.php); function my_streaming_callback($data, $length, $metrics) { echo \x0D\x0A Recieved: .$data .PHP_EOL.\x0D\x0A; return file_exists(dirname(__FILE__) . '/STOP'); } $tmhOAuth = new tmhOAuth(array( 'consumer_key'= CONSUMER_KEY, 'consumer_secret' = CONSUMER_SECRET, 'user_token' = OAUTH_TOKEN, 'user_secret' = OAUTH_TOKEN_SECRET, )); $method = 'http://stream.twitter.com/1/statuses/filter.json'; // show Tweets which contan the word twitter OR have been geo-tagged within // the bounding box -122.41,37.77,-122.40,37.78 OR are by themattharris $params = array( 'track' = '@something, // Around Twitter HQ. First param is the SW corner of the bounding box //'locations' = '-122.41,37.77,-122.40,37.78', //'follow'= '106045630' // fb ); $tmhOAuth-streaming_request('POST', $method, $params, 'my_streaming_callback'); $tmhOAuth-pr($tmhOAuth); - Im starting this php script as backgrond process on linux, with output to log file. I have noticed one strange thing, this process was succesfully working for 23 hours,but then it was stopped. In my log file i have found text, that was printed by method $tmhOAuth- pr($tmhOAuth): pre style=word-wrap: break-wordtmhOAuth Object ( [params] = Array ( ) [auto_fixed_time] = [config] = Array ( [consumer_key] = [consumer_secret] = [user_token] = [user_secret] = xxx [use_ssl] = 1 [host] = api.twitter.com [debug] = [force_nonce] = [nonce] = xx [force_timestamp] = [timestamp] = 1292913341 [oauth_version] = 1.0 [curl_connecttimeout] = 30 [curl_timeout] = 10 [curl_ssl_verifypeer] = [curl_followlocation] = [is_streaming] = 1 [streaming_eol] = [streaming_metrics_interval] = 60 [streaming_callback] = my_streaming_callback [multipart] = ) [metrics] = Array ( [start] = 1292913341 [interval_start] = 1292987476 [tweets] = 2473 [last_tweets] = 2473 [bytes] = 8715 [last_bytes] = 8715 [tps] = 0.03 [bps] = 0 ) [method] = POST [url] = http://stream.twitter.com/1/statuses/filter.json [signing_params] = oauth_consumer_key=oauth_nonce=xxoauth_signature_method=HMAC- SHA1oauth_timestamp=1292913341oauth_token=xxxoauth_version=1.0track= %40something [auth_params] = Array ( [oauth_consumer_key] = iyaqddrf01Kyp6VsshlEg [oauth_nonce] = xx [oauth_signature] = x [oauth_signature_method] = HMAC-SHA1 [oauth_timestamp] = 1292913341 [oauth_token] = xxx [oauth_version] = 1.0 ) [request_params] = track=%40something [base_string] = POSThttp%3A%2F%2Fstream.twitter.com %2F1%2Fstatuses%2Ffilter.jsonoauth_consumer_key%xx %26oauth_nonce%x%26oauth_signature_method%3DHMAC- SHA1%26oauth_timestamp%3D1292913341%26oauth_token %xx%26oauth_version%3D1.0%26track%3D%2540something [signing_key] = xxx [headers] = Array ( [0] = Authorization: OAuth oauth_consumer_key=xx, oauth_nonce=xxx, oauth_signature=, oauth_signature_method=HMAC-SHA1, oauth_timestamp=1292913341, oauth_token=xxx, oauth_version=1.0 [1] = Expect: ) [auth_header] = OAuth oauth_consumer_key=iyaqddrf01Kyp6VsshlEg, oauth_nonce=x, oauth_signature=x, oauth_signature_method=HMAC-SHA1, oauth_timestamp=1292913341, oauth_token=xxx, oauth_version=1.0 [response] = Array ( [content-length] = 0 [headers] = Array ( [content_type] = application/json [transfer_encoding] = chunked [server] = Jetty(6.1.25) ) [code] = 200 [response] = 1 [info] = Array ( [url] = http://stream.twitter.com/1/statuses/filter.json
[twitter-dev] Search API from_user_id doesn't match up with the proper Twitter user_id
I just wanted to bring group-wide awareness to the fact that search results from Twitter do not return an actual user_id. This has been a known defect (and yes, I do believe it's a *very large* defect) going on over 2 years now. This is a call to arms to get this shit fixed. I can't believe it's marked as an enhancement. There's nobody else to blame for providing a return param of from_user that doesn't actually map to an actual user. For those of us storing relational data, you're costing precious API calls for those users who are still utilizing the search API. The streaming API is not sufficient for all use cases, so that's not a valid answer. Below is the direct link to the issue tracker. https://code.google.com/p/twitter-api/issues/detail?id=214 -- 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: Search API from_user_id doesn't match up with the proper Twitter user_id
Also, while it would be possible to use screen names for relations (i.e. from_user), this would have a very negative side effect. Mainly, if a user were to change their Twitter account name, previous relations would be lost. On Dec 22, 9:44 am, Corey Ballou ball...@gmail.com wrote: For clarification, I had intended to say from_user_id, as the username is returned properly. On Dec 22, 9:42 am, Corey Ballou ball...@gmail.com wrote: I just wanted to bring group-wide awareness to the fact that search results from Twitter do not return an actual user_id. This has been a known defect (and yes, I do believe it's a *very large* defect) going on over 2 years now. This is a call to arms to get this shit fixed. I can't believe it's marked as an enhancement. There's nobody else to blame for providing a return param of from_user that doesn't actually map to an actual user. For those of us storing relational data, you're costing precious API calls for those users who are still utilizing the search API. The streaming API is not sufficient for all use cases, so that's not a valid answer. Below is the direct link to the issue tracker. https://code.google.com/p/twitter-api/issues/detail?id=214 -- 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] Search API from_user_id doesn't match up with the proper Twitter user_id
I'm sure Taylor or Matt will reply politely to this rant. I don't work for Twitter, so I'd like to take on your attitude of entitlement directly towards this free service. Your basic approach can be summed up as How dare Twitter have problems in a totally free API that I can use to build a business on! First of all, this service is free, second there is an easy workaround for this. - You collect the tweets from the search API and store the user name, which is delivered correctly, along with the tweet info. You also get the avatar image. So you have enough now to display the tweet. - You then run a background process which waits until you have 100 user names, and requests their correct user info from the REST API. This can be stored in a separate user table. - This same process goes back to the tweets and updates each one with the correct user id. - You now have a valid relational database with a table for tweets, and a table for users. While this isn't perfect, it isn't hard to do either. At 100 users per request, and as long as you only request data for users you haven't seen before, there is no problem back filling this user data within the rate limits. Now, back to your attitude. The Twitter API is free. I agree that they should fix search, but it is acquired code, and my bet is that they want to rewrite it rather than patch it. The real point is that it is free. It is not a right granted to you to always have perfect code delivered to you. Twitter benefits from you writing code against there API, and you benefit from getting the data for free. Be grateful. Chill. On Wed, Dec 22, 2010 at 9:42 AM, Corey Ballou ball...@gmail.com wrote: I just wanted to bring group-wide awareness to the fact that search results from Twitter do not return an actual user_id. This has been a known defect (and yes, I do believe it's a *very large* defect) going on over 2 years now. This is a call to arms to get this shit fixed. I can't believe it's marked as an enhancement. There's nobody else to blame for providing a return param of from_user that doesn't actually map to an actual user. For those of us storing relational data, you're costing precious API calls for those users who are still utilizing the search API. The streaming API is not sufficient for all use cases, so that's not a valid answer. Below is the direct link to the issue tracker. https://code.google.com/p/twitter-api/issues/detail?id=214 -- 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 -- Adam Green Twitter API Consultant and Trainer http://140dev.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-dev] List of applications
I am working on some automation for our setup and I was wondering if their is a way to get a list of the applications that you have created under your account? -- 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] tc2.cpp broken ?
Hi, I have an application that has been working for a over a month now, using brooks' tc2.cpp code for reading twitter statuses only. I am now getting authentication error, does anyone know if there has been an OAuth change ? or is this a temporary twitter bug ? Thanks in advance, Guy. -- 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 NULL in JSON XML
There's a problem when I using twitter API about JSON response. Here is the sample code: $connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $access_token['oauth_token'], $access_token['oauth_token_secret']); $content = $connection-get('statuses/followers'); When I do this the response will be OK, an array of stdClass Objects. But when I change the code into $content = $connection-get('statuses/followers.json'); or $content = $connection-get('statuses/followers.xml'); the response will both be NULL. but the $connection-http_code is 200. Did I misuse the API or miss something? Can someone please help me out with this ? -smallbighead -- 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 access to friendship data of twitter users
Hello! If I want to access all of the friendship data of twitter users, i.e. how twitter users connect with each other, is it possible to do it? I am not interested in other information of users such as name, gender and so on. In other words, I just want to get the network of twitter users, no other information. I am just the beginner of twitter developer, and I am sorry if the message would bother you. Any of your reply is highly appreciated! Thank you. Xintao -- PhD Candidate Dept. of Urban Planning and Environment Royal Institute of Technology, 100 44 Stockholm, Sweden Address: Drottning Kristinas väg 30 -- 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] Return NULL in JSON XML
JSON is used by default so you should be using $content = $connection-get('statuses/followers'); Abraham - Abraham Williams | Hacker Advocate | abrah.am @abraham https://twitter.com/abraham | github.com/abraham | blog.abrah.am This email is: [ ] shareable [x] ask first [ ] private. On Wed, Dec 22, 2010 at 01:47, smallbighead smallbigh...@gmail.com wrote: There's a problem when I using twitter API about JSON response. Here is the sample code: $connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $access_token['oauth_token'], $access_token['oauth_token_secret']); $content = $connection-get('statuses/followers'); When I do this the response will be OK, an array of stdClass Objects. But when I change the code into $content = $connection-get('statuses/followers.json'); or $content = $connection-get('statuses/followers.xml'); the response will both be NULL. but the $connection-http_code is 200. Did I misuse the API or miss something? Can someone please help me out with this ? -smallbighead -- 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] Taking over a suspended account
I have a client who wants an account name that is owned by someone else. The account has been suspended for a long time, the client says. Is there a procedure or an email address they can use to apply to get that account name? I suggested just moving to another name, but they *really* want this name. Any contacts you recommend? -- 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_endpoint for site streams?
What are the signing_endpoint, and api_endpoint for sitestreams? I'm assuming they're both - http://betastream.twitter.com but get OAuth::Unauthorized: 401 Unauthorized when I try to obtain a request token. My app has been whitelisted for the Site Streams Whitelist Beta any help would be appreciated. Best, Temo. -- 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: How to access to friendship data of twitter users
Have a look here: http://an.kaist.ac.kr/traces/WWW2010.html The authors described how you can get a social graph from Twitter, and there is even a ready-to-use social graph of many Twitter users available for you to download. On Dec 22, 3:31 pm, Xintao Liu liuxinta...@gmail.com wrote: Hello! If I want to access all of the friendship data of twitter users, i.e. how twitter users connect with each other, is it possible to do it? I am not interested in other information of users such as name, gender and so on. In other words, I just want to get the network of twitter users, no other information. I am just the beginner of twitter developer, and I am sorry if the message would bother you. Any of your reply is highly appreciated! Thank you. Xintao -- PhD Candidate Dept. of Urban Planning and Environment Royal Institute of Technology, 100 44 Stockholm, Sweden Address: Drottning Kristinas väg 30 -- 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] Reconnection to Streaming API
Hi All, I was trying to write some shell scripts to do the following job: when the Streaming API stops working for whatever reason, make a reconnection immediately. Here is how I did it: I wrote a script called check.sh: c=$(ps aux | grep curl|wc -l) if [[ $c -eq 1 ]] % which means there is no active curl process, the only live one is grep then curl -d @locations http://stream.twitter.com/1/statuses/filter.json - u username:password result.txt fi And I created a cron job which runs this check.sh every minute: 0-59 0-23 * * * check.sh monitor.txt It does the job partially: it can reconnect to Streaming API in the case of disconnection. My problem is that, by running this script as a cron job, the Streaming API got disconnected at the end of every minute, and then reconnect again at the beginning of the next minute, and I have no clue why it got disconnected every minute. The problem seems coming from the cron job I created, but I couldn't find mistakes there. Does anyone have suggestions on this? Many thanks for the kind help! epomqo -- 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] Search API from_user_id doesn't match up with the proper Twitter user_id
I think twitter's response to this call to arms should be the HTTP Status Code: 420 - Chill ;-} -- 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] 4294967295
I just wanted to follow up on this, because the issue continues to happen, and it gets more and more interesting. We've now been seeing user.listed_count coming back as 4294967293 on occasion. So just to recap, we have now seen these values in the user.listed_count field: 4294967295 (a.k.a. unsigned -1) 4294967294 (a.k.a. unsigned -2) 4294967293 (a.k.a. unsigned -3) twitter4j has worked around this issue no problem, but I'm more than just a bit curious what these values represent. Should -1 and -2 and -3 be treated to mean anything other than we don't know what the listed count is? What happens if/when -4 starts popping out? I realize this is pretty low priority, but it's still a bug... Thanks, Dan On Fri, Dec 17, 2010 at 7:17 AM, Dan Checkoway dchecko...@gmail.com wrote: Check this out...today sometime between 4:01:43 AM PST and 4:01:53 AM PST (sorry for the ambiguity, those are our every 10 sec logging timestamps for other stuff), we saw the unsigned equivalent of -2 (4294967294) being sent by twitter in user.listed_count... Exception in thread Twitter Stream Handling Thread[Receiving stream] java.lang .NumberFormatException: For input string: 4294967294 at java.lang.NumberFormatException.forInputString(NumberFormatException. java:48) at java.lang.Integer.parseInt(Integer.java:459) at java.lang.Integer.valueOf(Integer.java:553) at twitter4j.internal.util.ParseUtil.getInt(ParseUtil.java:120) at twitter4j.UserJSONImpl.init(UserJSONImpl.java:103) at twitter4j.UserJSONImpl.init(UserJSONImpl.java:86) at twitter4j.StatusJSONImpl.init(StatusJSONImpl.java:101) at twitter4j.StatusJSONImpl.init(StatusJSONImpl.java:84) at twitter4j.StatusJSONImpl.init(StatusJSONImpl.java:118) at twitter4j.StatusJSONImpl.init(StatusJSONImpl.java:84) at twitter4j.StatusStreamImpl.handleNextElement(StatusStreamImpl.java:116) at twitter4j.StatusStreamImpl.next(StatusStreamImpl.java:89) at twitter4j.TwitterStream$StreamHandlingThread.run(TwitterStream.java:529) Any idea what's going on and/or when it might be fixed? Thanks, Dan On Tue, Dec 14, 2010 at 8:10 PM, Taylor Singletary taylorsinglet...@twitter.com wrote: Thanks! This is being looked into. I'll update when I have news. Taylor On Tuesday, December 14, 2010, Dan Checkoway dchecko...@gmail.com wrote: Yeah, you bet. Twitter4j isn't logging a timestamp when it happens, but here are a handful of timestamps for unrelated stuff that got logged no more than 10 seconds *prior* to the 4294967295 error popping out...so they're fairly close: Dec 14, 2010 12:34:11 PM PST Dec 14, 2010 1:13:07 PM PST Dec 14, 2010 1:22:48 PM PST Dec 14, 2010 1:27:22 PM PST Dec 14, 2010 1:29:48 PM PST Dec 14, 2010 1:33:36 PM PST Based on the twitter4j stack trace, I can tell you that it was *always* user.listed_count that had the funky value: Exception in thread Twitter Stream Handling Thread[Receiving stream] java.lang .NumberFormatException: For input string: 4294967295 at java.lang.NumberFormatException.forInputString(NumberFormatException. java:48) at java.lang.Integer.parseInt(Integer.java:459) at java.lang.Integer.valueOf(Integer.java:553) at twitter4j.internal.util.ParseUtil.getInt(ParseUtil.java:120) at twitter4j.UserJSONImpl.init(UserJSONImpl.java:103) Thanks, Dan On Tue, Dec 14, 2010 at 6:42 PM, Taylor Singletary taylorsinglet...@twitter.com wrote: Understandable, Dan. Can you tell me the last time an event like this happened? Taylor On Tue, Dec 14, 2010 at 3:41 PM, Dan Checkoway dchecko...@gmail.com wrote: I know this is the weenie answer, but I haven't been able to track a specific offending JSON object down yet, since it only seems to happen on the firehose, and we're using twitter4j to process that. If we were able to connect to the firehose more than once at a time, I could easily write a tool to detect and highlight the issue. Short of that, I'll try watching the sample stream for a while to see if the same issue pops up there. Will report any findings... Thanks, Dan On Tue, Dec 14, 2010 at 6:19 PM, Taylor Singletary taylorsinglet...@twitter.com wrote: Hi Dan, Do you continue to see events like this happening? Can you provide a recent example in as-provided JSON or XML? Thanks, Taylor On Tue, Dec 14, 2010 at 2:13 PM, Dan Checkoway dchecko...@gmail.com wrote: Anybody else seeing user.listed_count occasionally coming back as 4294967295? That value just happens to equate to: 1 + (2 * Integer.MAX_VALUE) Sure looks like an unsigned version of -1 to me... Anyway, it's breaking twitter4j.TwitterStream stuff. I've mentioned that separately on the twitter4j list, but I wanted to raise the issue here since the root cause is twitter sending the weird
[twitter-dev] Re: Need help to develop twitter application, Plz reply me
Are you coding the Twitter app in Lua? Not sure there is Lua OAuth Library to support Twitter API? You need to be more specific in your app in order to get some more help. On Dec 21, 9:22 pm, roopesh rai roopesh.ra...@gmail.com wrote: It is in Lua On Tue, Dec 21, 2010 at 4:13 PM, Amine amine.benha...@gmail.com wrote: Hello Rai, To get a idea about Twitter Development, start by this : http://www.slideshare.net/raffikrikorian/intro-to-developing-for-twit... It will give an deep overview. Later go to this page : http://dev.twitter.com/doc. Are coding in which language ? On 21 déc, 07:16, Roopesh Rai roopesh.ra...@gmail.com wrote: Thank u for reply I am very new to this application, So not understanding basic concepts itself, can you suggest me any document to read, and having following info * how any user can login just by his username and password,how he will get authentication ??? * how I can use this in my application, I mean design for login If anybody know answer and ready to share valuable time for sharing knowledge, plz suggest me regards, Rai On Dec 21, 9:24 am, Bess bess...@gmail.com wrote: I am surprised that no one here to response you. May be you are asking very basic info. You should go buy a Twitter developer book online ebook or from a book store. We are releasing a Twitter API Developer book but it is not available yet til next year. You'll need to use OAuth, not basic auth. Twitter OAuth Libraryhttp://dev.twitter.com/pages/oauth_libraries Use consumer key and consumer secret from your app settings in your OAuth lib. Your Twitter API is limited by hour and no. of tweets. On Dec 19, 11:28 pm, Roopesh Rai roopesh.ra...@gmail.com wrote: If anybody know solution to above question, Please reply me. I am very new to twitter application development I am confusing. I am trying, Googling... But, Result is nill... Thank U On Dec 15, 2:33 pm, Roopesh Rai roopesh.ra...@gmail.com wrote: Hi all, I am developing twitter application. In this application without browser user can use Twitter, I am providing user a interface to use twitter. I registered my application with twitter . By Oauth I am accessing twiiter. My doubts starts here 1) In my application I need to develop such that any user can enter his user name and password, and he can enter to twitter home page(In my application), But now I am not using any username and password, Directly using consumer key, consumer secret key, token key, token secret key, PIN I am entering to twitter home. how i can allow other users to use my application just by there user name and password 2) By using statuses/home_timeline.json, I am getting only 14 timelines, How I can get all the timeline. Thank you for Your valuable reply. Regards, S.R Rai -- 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] ABOUT TWITTER API..............
http://123maza.com/28/come123/ -- 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] How to access to friendship data of twitter users
Maybe these calls would be a good start for you: http://dev.twitter.com/doc/get/friends/ids http://dev.twitter.com/doc/get/followers/ids Shannon On Wed, Dec 22, 2010 at 7:31 AM, Xintao Liu liuxinta...@gmail.com wrote: Hello! If I want to access all of the friendship data of twitter users, i.e. how twitter users connect with each other, is it possible to do it? I am not interested in other information of users such as name, gender and so on. In other words, I just want to get the network of twitter users, no other information. I am just the beginner of twitter developer, and I am sorry if the message would bother you. Any of your reply is highly appreciated! Thank you. Xintao -- PhD Candidate Dept. of Urban Planning and Environment Royal Institute of Technology, 100 44 Stockholm, Sweden Address: Drottning Kristinas väg 30 -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
[twitter-dev] Re: Oauth timeout at access_token request
I get great performance in the request_token call. I've racked my brain trying to come up with a way to send the same oauth headers some other way (other than writing a php page or something to do the same). I'm using .Net 1.1 standard HTTPWebRequest methods to do this. I would expect them to detect the response correctly. If I can't figure some other way out of it, I'll have to try writing a little curl request. I'm sure there's something wrong with the way I'm doing things, but I just can't see it. The weird part is that if there were something wrong with my oauth headers or signature or something, I'd expect the page to return with an error, the timeout is the unexpected part. In case it helps, here's my oauth request method: -- Public Shared Function GenerateOauthRequest(ByVal RequestUrl As String, ByVal RequestMethod As String, ByVal ConsumerKey As String, ByVal ConsumerSecret As String, ByVal OauthToken As String, ByVal OauthTokenSecret As String, Optional ByVal IncludeOauthToken As Boolean = False, Optional ByVal Data As String = Nothing, Optional ByVal OauthVerifier As String = , Optional ByVal OauthCallback As String = ) As Hashtable Dim objRequest As HttpWebRequest Dim datNow As DateTime = Date.UtcNow Dim lngTimestamp As Long = DateToUnixTimestamp(datNow) Dim strNonce As String = IntegerToSerialNumber(lngTimestamp) GenerateToken(20) Dim strSignatureMethod As String = HMAC-SHA1 Dim strHMACKey As String = ConsumerSecretOauthTokenSecret Dim stbSignature As New StringBuilder Dim strSignature As String = stbSignature.Append(RequestMethod) stbSignature.Append() stbSignature.Append(UrlEncodeRFC(RequestUrl)) Dim stbOAuthData As New StringBuilder If RequestMethod = GET And Not IsNothing(Data) Then If Data.Length 0 Then stbOAuthData.Append(Data) stbOAuthData.Append() End If End If stbOAuthData.Append(oauth_consumer_key=) stbOAuthData.Append(ConsumerKey) stbOAuthData.Append(oauth_nonce=) stbOAuthData.Append(strNonce) stbOAuthData.Append(oauth_signature_method=) stbOAuthData.Append(strSignatureMethod) stbOAuthData.Append(oauth_timestamp=) stbOAuthData.Append(lngTimestamp) If IncludeOauthToken And Not IsNothing(OauthToken) Then If OauthToken.Length 0 Then stbOAuthData.Append(oauth_token=) stbOAuthData.Append(OauthToken) End If End If If OauthVerifier.Length 0 Then stbOAuthData.Append(oauth_verifier=) stbOAuthData.Append(OauthVerifier) End If stbOAuthData.Append(oauth_version=1.0) stbSignature.Append() stbSignature.Append(UrlEncodeRFC(stbOAuthData.ToString)) strSignature = stbSignature.ToString Dim objHMAC As New HMACSHA1(Encoding.ASCII.GetBytes(strHMACKey)) Dim bytMessage() As Byte = Encoding.ASCII.GetBytes(strSignature) Dim bytSignature() As Byte = objHMAC.ComputeHash(bytMessage) strSignature = Convert.ToBase64String(bytSignature) If RequestMethod = GET And Not IsNothing(Data) Then If Data.Length 0 Then RequestUrl = ? Data End If objRequest = WebRequest.Create(RequestUrl) objRequest.Timeout = 3 objRequest.Method = RequestMethod Dim stbAuthorizationHeader As New StringBuilder stbAuthorizationHeader.Append(OAuth realm= RequestUrl ) stbAuthorizationHeader.Append(,oauth_consumer_key= ConsumerKey ) stbAuthorizationHeader.Append(,oauth_nonce= strNonce ) stbAuthorizationHeader.Append(,oauth_signature= UrlEncodeRFC(strSignature) ) stbAuthorizationHeader.Append(,oauth_signature_method= strSignatureMethod ) stbAuthorizationHeader.Append(,oauth_timestamp= lngTimestamp ) If IncludeOauthToken And Not IsNothing(OauthToken) Then If OauthToken.Length 0 Then stbAuthorizationHeader.Append(,oauth_token= UrlEncodeRFC(OauthToken) ) End If End If If OauthVerifier.Length 0 Then stbAuthorizationHeader.Append(,oauth_verifier= UrlEncodeRFC(OauthVerifier) ) End If stbAuthorizationHeader.Append(,oauth_version=1.0) objRequest.Headers.Add(Authorization, stbAuthorizationHeader.ToString) Dim hshReturn As New Hashtable Dim objResponse As HttpWebResponse Dim objReader As StreamReader hshReturn.Add(success, False) Try If RequestMethod = POST And Not IsNothing(Data) Then objRequest.ContentLength = Data.Length Dim objWriter As New StreamWriter(objRequest.GetRequestStream) objWriter.Write(Data.ToString) objWriter.Close() End If objResponse = objRequest.GetResponse If Not IsNothing(objResponse.Headers(Content-Location)) Then hshReturn.Add(content_location, objResponse.Headers(Content- Location)) objReader = New StreamReader(objResponse.GetResponseStream) hshReturn.Add(response, objReader.ReadToEnd()) hshReturn(success) = True Catch objWebException As
[twitter-dev] Re: After authenticating application I get redirected to connect.php
Ok .. I had to uncomment session.save_path in php.ini ... My hosting provider kept it commnted by default On Dec 20, 5:32 pm, Preetish preetis...@gmail.com wrote: Hi, I was developing a Facebook application for twitter. Before that I wanted to try out abraham's twitter oauth library.So, I set up the application and changed the config.php. When I access index.php it redirects to connect.php and from there I am able to authenticate my dummy application.But, after after authentication I again reach connect.php instead the user information array. Am I missing out anything ? Please let me know if anyone wants to know anything else.. Thanks in advance.Any suggestion is welcome. Regards Preetish -- 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] Feed No Longer Working
I run a website called AthletesWhoTweet.com, recently my web site has stopped pulling in the feeds from Twitter and I'm not sure why. My guess is that my code is totally out of date, as I had been using it for over two years. Basically, what I had been doing was pulling down a list of the most recent tweets from a group of Twitter users, in this case pro athletes. I created a Twitter account and followed all of these athletes whom i wanted to appear on my feed on my web site, and then pull down attributes such as their tweet, their username, their thumbnail, etc. In addition, I would pull down individual tweets from a particular athlete on a single page. As i mentioned, this recently stopped working and I am pretty in the dark as it pertain to getting back up and running. I don't know enough about coding or the API to get this fixed so I was hoping someone could point me in the right direction as to the code I need to use. I would also be willing to pay someone to get this fixed for me and of course have the non-functioning code on hand that just recently stopped working. Any help is appreciated! Thanks, Jon -- 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: Search API from_user_id doesn't match up with the proper Twitter user_id
I'm sure I came off a little strong in the initial post; unfortunately for me google groups doesn't supply an edit button. I think there is still a grain of merit to the request to fix the issue, regardless of the API being free. I'm interest in knowing the trade-offs of Twitter essentially requiring third party apps to make subsequent calls to users/lookup for each unique user in a batch of results. The current problem I see, from Twitter's end, is that the subsequent call returns far more data than necessary. It's doubling the RTTs on both ends and creating an excessive amount of bandwidth for a trivial amount of data. I've got to imagine there's a number of cache misses going on due to the frequency of user updates and pulling the latest tweet, so it would seem rather costly. On Dec 22, 4:33 pm, Robbie Coleman rob...@robnrob.com wrote: I think twitter's response to this call to arms should be the HTTP Status Code: 420 - Chill ;-} -- 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: Search API from_user_id doesn't match up with the proper Twitter user_id
Yeah, well the call to arms may have been over the top. :) I agree that Twitter should fix the search API. Every time I ask, the answer is that it will be done eventually, and that it will have entities and everything else the streaming API has. I think this means that it will be the streaming API code with the ability to look backwards added. Think about it, isn't that what any architect would do? You combine your code bases. The real problem with search is its inability to go back beyond 5-7 days. Since Twitter plans to make its money from search ads and compete for Google ad revenue, more search results means more searching and more ad revenue. I bet they plan on an IPO within a year, and the story that Twitter search is just a tiny fraction of Google search but growing like crazy is exactly the type of promise that makes investors crazy for an IPO. It is also pretty sad that Google just added the ability to search millions of books going back 500 years, and Twitter only goes back 5 days! So search is clearly very important. I just don't think they want to fix this code. It is Summize code, and they show no interest in diving into it. Until they rewrite it, we have to wait. On Wed, Dec 22, 2010 at 8:55 PM, Corey Ballou ball...@gmail.com wrote: I'm sure I came off a little strong in the initial post; unfortunately for me google groups doesn't supply an edit button. I think there is still a grain of merit to the request to fix the issue, regardless of the API being free. I'm interest in knowing the trade-offs of Twitter essentially requiring third party apps to make subsequent calls to users/lookup for each unique user in a batch of results. The current problem I see, from Twitter's end, is that the subsequent call returns far more data than necessary. It's doubling the RTTs on both ends and creating an excessive amount of bandwidth for a trivial amount of data. I've got to imagine there's a number of cache misses going on due to the frequency of user updates and pulling the latest tweet, so it would seem rather costly. On Dec 22, 4:33 pm, Robbie Coleman rob...@robnrob.com wrote: I think twitter's response to this call to arms should be the HTTP Status Code: 420 - Chill ;-} -- 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 -- Adam Green Twitter API Consultant and Trainer http://140dev.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] 4294967295
It's going to be a little bit of time before we can totally prevent these values from occurring. Right now, you should probably just consider this value as unknown rather than necessarily null, 0, or otherwise. The team responsible for the low level component causing the bug has a fix planned, but it can't be applied until a few more dependencies are resolved. Thanks, Taylor On Wed, Dec 22, 2010 at 2:59 PM, Dan Checkoway dchecko...@gmail.com wrote: I just wanted to follow up on this, because the issue continues to happen, and it gets more and more interesting. We've now been seeing user.listed_count coming back as 4294967293 on occasion. So just to recap, we have now seen these values in the user.listed_count field: 4294967295 (a.k.a. unsigned -1) 4294967294 (a.k.a. unsigned -2) 4294967293 (a.k.a. unsigned -3) twitter4j has worked around this issue no problem, but I'm more than just a bit curious what these values represent. Should -1 and -2 and -3 be treated to mean anything other than we don't know what the listed count is? What happens if/when -4 starts popping out? I realize this is pretty low priority, but it's still a bug... Thanks, Dan On Fri, Dec 17, 2010 at 7:17 AM, Dan Checkoway dchecko...@gmail.comwrote: Check this out...today sometime between 4:01:43 AM PST and 4:01:53 AM PST (sorry for the ambiguity, those are our every 10 sec logging timestamps for other stuff), we saw the unsigned equivalent of -2 (4294967294) being sent by twitter in user.listed_count... Exception in thread Twitter Stream Handling Thread[Receiving stream] java.lang .NumberFormatException: For input string: 4294967294 at java.lang.NumberFormatException.forInputString(NumberFormatException. java:48) at java.lang.Integer.parseInt(Integer.java:459) at java.lang.Integer.valueOf(Integer.java:553) at twitter4j.internal.util.ParseUtil.getInt(ParseUtil.java:120) at twitter4j.UserJSONImpl.init(UserJSONImpl.java:103) at twitter4j.UserJSONImpl.init(UserJSONImpl.java:86) at twitter4j.StatusJSONImpl.init(StatusJSONImpl.java:101) at twitter4j.StatusJSONImpl.init(StatusJSONImpl.java:84) at twitter4j.StatusJSONImpl.init(StatusJSONImpl.java:118) at twitter4j.StatusJSONImpl.init(StatusJSONImpl.java:84) at twitter4j.StatusStreamImpl.handleNextElement(StatusStreamImpl.java:116) at twitter4j.StatusStreamImpl.next(StatusStreamImpl.java:89) at twitter4j.TwitterStream$StreamHandlingThread.run(TwitterStream.java:529) Any idea what's going on and/or when it might be fixed? Thanks, Dan On Tue, Dec 14, 2010 at 8:10 PM, Taylor Singletary taylorsinglet...@twitter.com wrote: Thanks! This is being looked into. I'll update when I have news. Taylor On Tuesday, December 14, 2010, Dan Checkoway dchecko...@gmail.com wrote: Yeah, you bet. Twitter4j isn't logging a timestamp when it happens, but here are a handful of timestamps for unrelated stuff that got logged no more than 10 seconds *prior* to the 4294967295 error popping out...so they're fairly close: Dec 14, 2010 12:34:11 PM PST Dec 14, 2010 1:13:07 PM PST Dec 14, 2010 1:22:48 PM PST Dec 14, 2010 1:27:22 PM PST Dec 14, 2010 1:29:48 PM PST Dec 14, 2010 1:33:36 PM PST Based on the twitter4j stack trace, I can tell you that it was *always* user.listed_count that had the funky value: Exception in thread Twitter Stream Handling Thread[Receiving stream] java.lang .NumberFormatException: For input string: 4294967295 at java.lang.NumberFormatException.forInputString(NumberFormatException. java:48) at java.lang.Integer.parseInt(Integer.java:459) at java.lang.Integer.valueOf(Integer.java:553) at twitter4j.internal.util.ParseUtil.getInt(ParseUtil.java:120) at twitter4j.UserJSONImpl.init(UserJSONImpl.java:103) Thanks, Dan On Tue, Dec 14, 2010 at 6:42 PM, Taylor Singletary taylorsinglet...@twitter.com wrote: Understandable, Dan. Can you tell me the last time an event like this happened? Taylor On Tue, Dec 14, 2010 at 3:41 PM, Dan Checkoway dchecko...@gmail.com wrote: I know this is the weenie answer, but I haven't been able to track a specific offending JSON object down yet, since it only seems to happen on the firehose, and we're using twitter4j to process that. If we were able to connect to the firehose more than once at a time, I could easily write a tool to detect and highlight the issue. Short of that, I'll try watching the sample stream for a while to see if the same issue pops up there. Will report any findings... Thanks, Dan On Tue, Dec 14, 2010 at 6:19 PM, Taylor Singletary taylorsinglet...@twitter.com wrote: Hi Dan, Do you continue to see events like this happening? Can you provide a recent example in as-provided JSON or XML? Thanks, Taylor On Tue, Dec 14, 2010 at 2:13
[twitter-dev] Re: How to access to friendship data of twitter users
how twitter users connect with each other, is it possible to do it? Yes. I just want to get the network of twitter users, no other information. In addition to the ones mentioned by Shannon, also see http://dev.twitter.com/doc/get/friendships/show Returns detailed information about the relationship between two users. ~~~ Mohan -- 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