[twitter-dev] Re: OAuth and Perl

2009-05-19 Thread Jesse Stay
I just blogged a pretty thorough howto on this.  Let me know if you have
feedback:
http://staynalive.com/articles/2009/05/19/social-coding-how-to-code-twitters-oauth-using-netoauth-and-perl/
http://staynalive.com/articles/2009/05/19/social-coding-how-to-code-twitters-oauth-using-netoauth-and-perl/

@Jesse

On Fri, May 15, 2009 at 8:04 PM, ben deutsc...@gmail.com wrote:


 I'm having the same problem as Jesse using the Net::OAuth

 Here's what I get back from twitter:

 $VAR1 = bless( {
 '_protocol' = 'HTTP/1.1',
 '_content' = 'Failed to validate oauth signature or
 token',
 '_rc' = '401',
 '_headers' = bless( {
'connection' = 'close',
'set-cookie' =
 '_twitter_sess=BAh7BiIKZ0xhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo
 %250ASGFzaHsABjoKQHVzZWR7AA%253D
 %253D--1164b91ac812d853b877e93ddb612b7471bebc74; domain=.twitter.com;
 path=/',
'cache-control' = 'no-cache,
 max-age=300',
'status' = '401
 Unauthorized',
'date' = 'Sat, 16 May 2009
 01:57:55 GMT',
'vary' = 'Accept-Encoding',
'client-ssl-cert-issuer' = '/
 C=US/O=Equifax Secure Inc./CN=Equifax Secure Global eBusiness CA-1',
'client-ssl-cipher' = 'DHE-
 RSA-AES256-SHA',
'client-peer' =
 '128.121.146.100:443',
'client-warning' = 'Missing
 Authenticate header',
'client-date' = 'Sat, 16 May
 2009 01:57:55 GMT',
'client-ssl-warning' = 'Peer
 certificate not verified',
'content-type' = 'text/html;
 charset=utf-8',
'server' = 'hi',
'client-response-num' = 1,
'content-length' = '43',
'client-ssl-cert-subject' = '/
 C=US/O=twitter.com/OU=GT09721236/OU=See www.rapidssl.com/resources/cps
 (c)08/OU=Domain Control Validated - RapidSSL(R)/CN=twitter.com',
'expires' = 'Sat, 16 May 2009
 02:02:55 GMT'
  }, 'HTTP::Headers' ),
 '_msg' = 'Unauthorized',
 '_request' = bless( {
'_content' = '',
'_uri' = bless( do{\(my $o =
 'https://twitter.com/statuses/update.json?

 oauth_consumer_key=K9ICZr8UwHCVza91AH9Sgoauth_nonce=2AIYDaoQyknJ5Cpqoauth_signature=W
 %2BQu6CG7ENoVNghVyNU4DX%2B2LJM%3Doauth_signature_method=HMAC-
 SHA1oauth_timestamp=1242439075oauth_token=15385100-
 snbvmpiROaexwcJx00gkCegiBwX481bvGsVOmRo8eoauth_version=1.0status=Test
 +message')}, 'URI::https' ),
'_headers' = bless( {
   'user-
 agent' = 'libwww-perl/5.808',

 'content-type' = 'application/x-www-form-urlencoded',

 'content-length' = 0
 },
 'HTTP::Headers' ),
'_method' = 'POST'
  }, 'HTTP::Request' )
   }, 'HTTP::Response' );


 On Apr 30, 6:39 pm, Mario Menti mme...@gmail.com wrote:
  On Thu, Apr 30, 2009 at 11:22 PM, Jesse Stay jesses...@gmail.com
 wrote:
   I just wanted to bring back attention to this.  Has anyone on the list
   gotten Twitter's OAuth to work with Perl?  Care to share some code
 examples?
 
  I'm using Perl's Net::OAuth heavily, but only for updating twitter status
  with existing access tokens (as my backend processing is Perl, while the
  frontend is RoR, so authorisation/key exchange is handled through rails
  OAuth).
 
  I did find one bug which I've reported back to the Net::OAuth CPAN
  maintainer, who said he'll implement in a future release:
 
  The issue relates tohttp://
 code.google.com/p/twitter-api/issues/detail?id=433#c32(there's lots
  of useful into in this thread)
 
  The problem occurs when you pass an extra_param containing certain
 Unicode
  characters. What happens is that the parameter is passed to the signature
  creation, and the signature ends up wrong, leading to 401 errors when
 trying
  to make a request.
 
  The fix for this is actually detailed in the above thread, a problem with
  the regexp doing the escaping. In Perl's case, the below change
  to Net::OAuth's Message.pm fixes this:
 
  sub encode {
 my $str = shift;
 $str =  unless defined $str;
 # return URI::Escape::uri_escape_utf8($str,'^\w.~-');
 # MM, fix based on twitter OAuth bug report
 

[twitter-dev] Twitter4J 2.0.4 released - added Streaming API support fixed OAuth compatibility issue

2009-05-19 Thread Yusuke Yamamoto

Hi all,

Twitter4J 2.0.4 is available for download.
http://yusuke.homeip.net/twitter4j/en/index.html#download
It's also available at the Maven central repository.
http://repo1.maven.org/maven2/net/homeip/yusuke/twitter4j/

Previous versions have a compatibility issue with OAuth since May 13th.
Projects requiring OAuth support need to migrate to this version.

Compatibility notes:
- retirement of ExtendedUser class
Following methods return User, or ListUser instead of ExtendedUser,  
or ListExtendedUser:

getUserDetail()
verifyCredentials()
updateProfile()
updateProfileColors()
getBlockingUsers()
getAuthenticatedUser()

The method signatures of TwitterListener and TwitterAdapter are  
changed accordingly.


ExtendedUser and UserWithStatus class are retired(deleted) since  
the API returns extended user information with all methods.

Use User class instead.

- Streaming API support
Now Twitter4J supports the Streaming API which is in alpha test phase.
http://apiwiki.twitter.com/Streaming-API-Documentation
Please read the above document from top to bottom carefully before you  
dive into TwitterStream.

Note that the Streaming API is subject to change.

Release Notes - Twitter4J - Version 2.0.4 - HTML format
Bug
[TFJ-142] - DocumentBuilder.parse is not thread safe :  
NullPointerException at AbstractDOMParser.startElement

[TFJ-145] - twitter4j.http.Response shouldn't be Serializable
[TFJ-146] - getUserDetail should be invocable from unauthenticated  
Twitter instances
[TFJ-149] - OAuth fails with Invalid / expired Token after May 13,  
2009

Improvement
[TFJ-147] - retire ExtendedUser and UserWithStatus
New Feature
[TFJ-139] - streaming API support beta
[TFJ-144] - Add methods to retrieve blocking information
Task
[TFJ-143] - Deprecation of following and notification elements

Have fun!
--
Yusuke Yamamoto
yus...@mac.com
follow me at http://twitter.com/yusukeyamamoto



[twitter-dev] Re: Timezone Data

2009-05-19 Thread rchouinard

Which still doesn't give me a standard list. I can spend an hour and
map the Twitter names to standard timezone names, but my thought was
that it would serve the development community better if the standard
zone names were returned from the start. Just my $.02 cents, though.
You can keep the change. :-)


On May 18, 8:37 pm, Abraham Williams 4bra...@gmail.com wrote:
 Just take the timezone list from:https://twitter.com/account/settingsand
 convert it on your end.

 On Mon, May 18, 2009 at 14:10, Ryan Chouinard rchouin...@gmail.com wrote:

  Quick searches of the group didn't yield much information for me, so
  forgive me if this has been discussed before.

  I'm working on an application that could benefit from knowing the
  user's timezone. While I could use the current UTC offset, knowing the
  fixed zone would be the ideal solution. Currently, time_zone returns
  a general string (ie Eastern Time (US amp; Canada)). Is there a
  reason for this return format instead of using, say, the standard
  Olson / Zoneinfo / tzdata name (ie America/New_York)?

  -- Ryan Chouinard

 --
 Abraham Williams |http://the.hackerconundrum.com
 Hacker |http://abrah.am|http://twitter.com/abraham
 Web608 | Community Evangelist |http://web608.org
 This email is: [ ] blogable [x] ask first [ ] private.
 Sent from Mountain View, California, United States


[twitter-dev] problem with characters to send messages

2009-05-19 Thread Leo Baiano

My name is Leo Baiano, I am Brazilian and my English is not very good,
a little PHP program and I am starting time trying to work with the
Twitter API. I found a class ready for sending messages but I'm having
problems with some characters.

The class works but when I use any special characters in the message
here in Brazil two characters after the special character disappears.
For example, if I try to send the message: send only acentuação the
class acentuaç

If I try to send:

a escola é longe

is sent: a escola éonge

The class I'm using is:

$msg = Testando acentuação com XML préss aqui;

$out = POST http://twitter.com/statuses/update.json HTTP/1.1\r\n;
$out .= Host: twitter.com\r\n;

#Configure abaixo o seu login e senha do Twitter
$out .= Authorization: Basic .base64_encode ('user:senha').\r\n;

$out .= Content-type: application/x-www-form-urlencoded\r\n;
$out .= Content-length: .strlen(status=$msg).\r\n;
$out .= Connection: Close\r\n\r\n;
$out .= status=$msg;

$fp = fsockopen (twitter.com, 80);
if (fwrite($fp, $out)) {
echo $msg. enviada!;
}
fclose($fp);


[twitter-dev] Re: How would I automatically DM to a person once theyve followed me?

2009-05-19 Thread Swaroop

Email is your only real time option here.

On May 19, 7:45 am, Ryan Tuosto ryantuo...@gmail.com wrote:
 What is the best way to do this in real time?

 On Mon, May 18, 2009 at 6:38 PM, Abraham Williams 4bra...@gmail.com wrote:
  Then you use option b.

  Sent from my adp1

  On May 18, 2009 6:21 PM, Ryan Tuosto ryantuo...@gmail.com wrote:

  Ok, but if I'm writing this as a service, I don't have access to other
  people's emails.

   On Mon, May 18, 2009 at 5:19 PM, Abraham Williams 4bra...@gmail.com
  wrote:   A) parse the new ...


[twitter-dev] announcement - tweetmotif - topical summarization system

2009-05-19 Thread Brendan O'Connor
Hi, I feel a little bad that I always use twitter-dev to whine about bugs in
the search API.  But it's really great and you can build interesting things
on top of it!
We just put up an experimental search/text analytics app that clusters
tweets based on key phrases and terms relative to a specific search query.
It can sometimes be helpful for knowing *why* a term is trending, or for
finding different types of sentiments people have toward something.  There's
also a more research-y direction for discovering related concepts for a
query.

The first draft, experimental version is up; please play around with it if
you're in to this sort of thing.

http://tweetmotif.com
http://anyall.org/blog/2009/05/announcing-tweetmotif-for-summarizing-twitter-topics-with-a-dash-of-nlp/

-Brendan


[twitter-dev] Invalid signature when calling request_token

2009-05-19 Thread Ross Burton

Hi,

I'm porting my HTTP authentication based twitter client to OAuth, and
am having problems constructing a signed call to request_token that
twitter.com will accept.  The OAuth implementation has successfully
worked with two different sample servers and MySpace, so I don't think
I'm hitting any underlying bugs in my code.  That said, the OAuth
specification skims over encoding so it's possible that there is an
incompatibility.

This is what happens:

 GET 
 /oauth/request_token?oauth%5Fconsumer%5Fkey=sPHnVfjaW22jHcGYyHCFAoauth%5Fsignature=zRmErZcLje9Nns2VEtsyRwzztQE%3Doauth%5Fsignature%5Fmethod=HMAC%2DSHA1oauth%5Fnonce=1276674971oauth%5Ftimestamp=1242721670oauth%5Fversion=1%2E0
  HTTP/1.1
 Soup-Debug-Timestamp: 1242721670
 Soup-Debug: SoupSessionAsync 1 (0x8f315b8), SoupMessage 1 (0x901d868), 
 SoupSocket 1 (0x902f820)
 Host: twitter.com

 HTTP/1.1 401 Unauthorized
 Soup-Debug-Timestamp: 1242721670
 Soup-Debug: SoupMessage 1 (0x901d868)
 Date: Tue, 19 May 2009 08:27:51 GMT
 Server: hi
 Last-Modified: Tue, 19 May 2009 08:27:51 GMT
 Status: 401 Unauthorized
 Pragma: no-cache
 Cache-Control: no-cache, no-store, must-revalidate, pre-check=0,
post-check=0
 Content-Type: text/html; charset=utf-8
 Content-Length: 44
 Expires: Tue, 31 Mar 1981 05:00:00 GMT
 X-Revision: 0056844fe50774f758d59f4d2931e6b31ccbf68f
 X-Transaction: 1242721671-71519-1029
 Set-Cookie:
_twitter_sess=BAh7BzoHaWQiJTkxZTYyNWM2OWMxZWIwMGE3MDczYTI1MTUzMjIwNDE2Igpm
%250AbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAG
%250AOgpAdXNlZHsA--32fb8d8fe9b5a3845060194eb2160f14fe9114c8;
domain=.twitter.com; path=/
 Vary: Accept-Encoding
 Connection: close

 Failed to validate oauth signature and token

Anyone got any good ideas?  I'm hoping that this isn't an encoding
problem...

Cheers,
Ross


[twitter-dev] Re: Twitter4J 2.0.4 released - added Streaming API support fixed OAuth compatibility issue

2009-05-19 Thread imgnik

thank you! i am a fan of twitter4j :)

On May 19, 11:07 am, Yusuke Yamamoto yus...@mac.com wrote:
 Hi all,

 Twitter4J 2.0.4 is available for 
 download.http://yusuke.homeip.net/twitter4j/en/index.html#download
 It's also available at the Maven central 
 repository.http://repo1.maven.org/maven2/net/homeip/yusuke/twitter4j/

 Previous versions have a compatibility issue with OAuth since May 13th.
 Projects requiring OAuth support need to migrate to this version.

 Compatibility notes:
 - retirement of ExtendedUser class
 Following methods return User, or ListUser instead of ExtendedUser,  
 or ListExtendedUser:
 getUserDetail()
 verifyCredentials()
 updateProfile()
 updateProfileColors()
 getBlockingUsers()
 getAuthenticatedUser()

 The method signatures of TwitterListener and TwitterAdapter are  
 changed accordingly.

 ExtendedUser and UserWithStatus class are retired(deleted) since  
 the API returns extended user information with all methods.
 Use User class instead.

 - Streaming API support
 Now Twitter4J supports the Streaming API which is in alpha test 
 phase.http://apiwiki.twitter.com/Streaming-API-Documentation
 Please read the above document from top to bottom carefully before you  
 dive into TwitterStream.
 Note that the Streaming API is subject to change.

 Release Notes - Twitter4J - Version 2.0.4 - HTML format
 Bug
 [TFJ-142] - DocumentBuilder.parse is not thread safe :  
 NullPointerException at AbstractDOMParser.startElement
 [TFJ-145] - twitter4j.http.Response shouldn't be Serializable
 [TFJ-146] - getUserDetail should be invocable from unauthenticated  
 Twitter instances
 [TFJ-149] - OAuth fails with Invalid / expired Token after May 13,  
 2009
 Improvement
 [TFJ-147] - retire ExtendedUser and UserWithStatus
 New Feature
 [TFJ-139] - streaming API support beta
 [TFJ-144] - Add methods to retrieve blocking information
 Task
 [TFJ-143] - Deprecation of following and notification elements

 Have fun!
 --
 Yusuke Yamamoto
 yus...@mac.com
 follow me athttp://twitter.com/yusukeyamamoto


[twitter-dev] Re: Timezone Data

2009-05-19 Thread rchouinard

I can get a list of Twitter's zones easily enough, and I understand
that. While I could spend time going through Twitter's timezone select
box and manually map the values to Olson zone names (which is what I'm
sure I'll end up doing), this could be made easier if Twitter simply
returned the standardized names.

I'm not familiar with Ruby, so this may very well be how Ruby lists
and names the zones. My experience with other languages, however, is
that the Olson / tzdata / Unix names are fairly standard and plug
right in. I'm not asking where I can find Twitter's zone names, I'm
asking why Twitter returns what it does, and if looking into returning
something else is warranted.

-- Ryan Chouinard


On May 18, 8:37 pm, Abraham Williams 4bra...@gmail.com wrote:
 Just take the timezone list from:https://twitter.com/account/settingsand
 convert it on your end.

 On Mon, May 18, 2009 at 14:10, Ryan Chouinard rchouin...@gmail.com wrote:

  Quick searches of the group didn't yield much information for me, so
  forgive me if this has been discussed before.

  I'm working on an application that could benefit from knowing the
  user's timezone. While I could use the current UTC offset, knowing the
  fixed zone would be the ideal solution. Currently, time_zone returns
  a general string (ie Eastern Time (US amp; Canada)). Is there a
  reason for this return format instead of using, say, the standard
  Olson / Zoneinfo / tzdata name (ie America/New_York)?

  -- Ryan Chouinard

 --
 Abraham Williams |http://the.hackerconundrum.com
 Hacker |http://abrah.am|http://twitter.com/abraham
 Web608 | Community Evangelist |http://web608.org
 This email is: [ ] blogable [x] ask first [ ] private.
 Sent from Mountain View, California, United States


[twitter-dev] Re: problem with characters to send messages

2009-05-19 Thread Cameron Kaiser

 The class works but when I use any special characters in the message
 here in Brazil two characters after the special character disappears.

This sounds like you aren't handling UTF-8 correctly in PHP. In particular
you should look at the utf8_encode() and _decode() functions. This page
may also be useful for multi-byte encodings:

http://developer.loftdigital.com/blog/php-utf-8-cheatsheet

-- 
 personal: http://www.cameronkaiser.com/ --
  Cameron Kaiser * Floodgap Systems * www.floodgap.com * ckai...@floodgap.com
-- The faster we go, the rounder we get. -- The Grateful Dead, on relativity --


[twitter-dev] Re: Anti Spam

2009-05-19 Thread sillyt...@googlemail.com

We had a chat about Twitter spam yesterday and would like a points
based approach to user ranking or spam rating. For those of us working
on 3rd party applications, having a spam score to be able to make
quick decisions on with regard to searches would be very useful.

For example, a new user would have a higher 'spam-rating' than a long
time user. Someone with a huge follow:follower ratio similarly. Given
how spam is used on Twitter, there are several categories which could
be dealt with at run-time on a server but less easily on a live
application.

BTW I worry that to join the abuse team one has to have what it
takes. Does that mean they hand out large amounts of abuse ?-)

On May 18, 7:12 pm, Doug Williams d...@twitter.com wrote:
 We have a team dedicated to controlling the number of spam messages and
 accounts in the system. The number of accounts, sophistication, and
 techniques are constantly growing. The team is doing a great job of
 isolating known attack vectors. Obviously there is still work to be
 done. The abuse team is hiring. If you think you have what it takes, please
 apply:http://twitter.com/jobs
 Thanks,
 Doug
 --

 Doug Williams
 Twitter Platform Supporthttp://twitter.com/dougw

 On Sat, May 16, 2009 at 8:14 PM, sillyt...@googlemail.com 

 sillyt...@googlemail.com wrote:

  I'm working as part of the #twumpet team and as part of our project
  we're developing an application as well as running some Twitter events
  - the first having been Eurovision earlier today.

  As we hit the top trend, #twumpet got - and is still getting -
  enormous amounts of spam. Spammers are signing up, blitzing messages
  through one immediately after another, and then moving on to the next
  account.

  Does anyone know if Twitter are going to stop users firing tweets off
  one after another so blatently like this? I just checked on a couple
  of top trends and all I can see is spammers tonight.

  Also, as a developer working on a project which will be dealing with
  trending topics and popular searches, I need a quick way to throw out
  spam messages.

  I have a couple of ideas for strategies but would be interested in
  discussing them, and perhaps a group effort which used Twitter itself
  for rapid short term spam classification  reporting [through Twitter
  search or a further API]. The one thing about spammers is they appear
  and disappear extremely quickly so any lists would be very short and
  'live', at least for now...

  @newretro


[twitter-dev] Re: Are there ANY advantage of using OAuth with client softwares?

2009-05-19 Thread Thomas Mango

Another advantage is that if a third party application's database is
breached, all of the stored usernames and passwords would be exposed.
If the third party application was using oauth, the access token and
secret pairs are only useable if the consumer key/secret pair are
found and these can be easily reset.

On May 18, 2:56 pm, Adam Ness adam.n...@gmail.com wrote:
 The advantage to the end user of oAuth is that the client application
 doesn't need the user's password anymore, the user's passwords are exchanged
 ONLY with twitter, and cannot be sniffed/stored/whatever by the client
 application.  There is a very strong security advantage.

 On Mon, May 18, 2009 at 7:30 AM, H.Hiro(Maraigue)
 marai...@mail.goo.ne.jpwrote:





  Hello,

  I COULD NOT UNDERSTAND why Twitter so much encourages OAuth, in spite
  of costing API users.

  I read the section What Does OAuth Give Me? (a.k.a. Why Bother?) of
  this article:
 http://apiwiki.twitter.com/OAuth+Example+-+Ruby,
  but I could not find what is the advantage of using OAuth *for client-
  software makers* .

  Client softwares must know end-users'(i.e. account holders') login
  names and passwords, so I think there aren't more advantage of using
  OAuth than basic-auth.


[twitter-dev] Re: Anti Spam

2009-05-19 Thread Paul Kinlan
Hi Guys,

I developed http://www.itsabot.com, which was designed to detect twitter
bots.  I am happy to open this up as a larger project if people want - and
move it into an open source project with spam accounts, not just bots.

Paul

2009/5/19 sillyt...@googlemail.com sillyt...@googlemail.com


 We had a chat about Twitter spam yesterday and would like a points
 based approach to user ranking or spam rating. For those of us working
 on 3rd party applications, having a spam score to be able to make
 quick decisions on with regard to searches would be very useful.

 For example, a new user would have a higher 'spam-rating' than a long
 time user. Someone with a huge follow:follower ratio similarly. Given
 how spam is used on Twitter, there are several categories which could
 be dealt with at run-time on a server but less easily on a live
 application.

 BTW I worry that to join the abuse team one has to have what it
 takes. Does that mean they hand out large amounts of abuse ?-)

 On May 18, 7:12 pm, Doug Williams d...@twitter.com wrote:
  We have a team dedicated to controlling the number of spam messages and
  accounts in the system. The number of accounts, sophistication, and
  techniques are constantly growing. The team is doing a great job of
  isolating known attack vectors. Obviously there is still work to be
  done. The abuse team is hiring. If you think you have what it takes,
 please
  apply:http://twitter.com/jobs
  Thanks,
  Doug
  --
 
  Doug Williams
  Twitter Platform Supporthttp://twitter.com/dougw
 
  On Sat, May 16, 2009 at 8:14 PM, sillyt...@googlemail.com 
 
  sillyt...@googlemail.com wrote:
 
   I'm working as part of the #twumpet team and as part of our project
   we're developing an application as well as running some Twitter events
   - the first having been Eurovision earlier today.
 
   As we hit the top trend, #twumpet got - and is still getting -
   enormous amounts of spam. Spammers are signing up, blitzing messages
   through one immediately after another, and then moving on to the next
   account.
 
   Does anyone know if Twitter are going to stop users firing tweets off
   one after another so blatently like this? I just checked on a couple
   of top trends and all I can see is spammers tonight.
 
   Also, as a developer working on a project which will be dealing with
   trending topics and popular searches, I need a quick way to throw out
   spam messages.
 
   I have a couple of ideas for strategies but would be interested in
   discussing them, and perhaps a group effort which used Twitter itself
   for rapid short term spam classification  reporting [through Twitter
   search or a further API]. The one thing about spammers is they appear
   and disappear extremely quickly so any lists would be very short and
   'live', at least for now...
 
   @newretro



[twitter-dev] Re: Anti Spam

2009-05-19 Thread Abraham Williams
On Tue, May 19, 2009 at 06:06, sillyt...@googlemail.com 
sillyt...@googlemail.com wrote:

 For example, a new user would have a higher 'spam-rating' than a long
 time user. Someone with a huge follow:follower ratio similarly. Given
 how spam is used on Twitter, there are several categories which could
 be dealt with at run-time on a server but less easily on a live
 application.


I know these are just examples but both of those metrics are available to
you and nothing is stopping you from restricting data from accounts based on
those metrics.

-- 
Abraham Williams | http://the.hackerconundrum.com
Hacker | http://abrah.am | http://twitter.com/abraham
Web608 | Community Evangelist | http://web608.org
This email is: [ ] blogable [x] ask first [ ] private.
Sent from Mountain View, CA, United States


[twitter-dev] Re: Timezone Data

2009-05-19 Thread Abraham Williams
I would say the API will try to be consistent with the web interface and
those are the strings the web interface currently uses. You can try to
convince http://help.twitter.com to change the strings used.

On Tue, May 19, 2009 at 06:03, rchouinard rchouin...@gmail.com wrote:


 I can get a list of Twitter's zones easily enough, and I understand
 that. While I could spend time going through Twitter's timezone select
 box and manually map the values to Olson zone names (which is what I'm
 sure I'll end up doing), this could be made easier if Twitter simply
 returned the standardized names.

 I'm not familiar with Ruby, so this may very well be how Ruby lists
 and names the zones. My experience with other languages, however, is
 that the Olson / tzdata / Unix names are fairly standard and plug
 right in. I'm not asking where I can find Twitter's zone names, I'm
 asking why Twitter returns what it does, and if looking into returning
 something else is warranted.

 -- Ryan Chouinard


 On May 18, 8:37 pm, Abraham Williams 4bra...@gmail.com wrote:
  Just take the timezone list from:https://twitter.com/account/settingsand
  convert it on your end.
 
  On Mon, May 18, 2009 at 14:10, Ryan Chouinard rchouin...@gmail.com
 wrote:
 
   Quick searches of the group didn't yield much information for me, so
   forgive me if this has been discussed before.
 
   I'm working on an application that could benefit from knowing the
   user's timezone. While I could use the current UTC offset, knowing the
   fixed zone would be the ideal solution. Currently, time_zone returns
   a general string (ie Eastern Time (US amp; Canada)). Is there a
   reason for this return format instead of using, say, the standard
   Olson / Zoneinfo / tzdata name (ie America/New_York)?
 
   -- Ryan Chouinard
 
  --
  Abraham Williams |http://the.hackerconundrum.com
  Hacker |http://abrah.am|http://twitter.com/abraham
  Web608 | Community Evangelist |http://web608.org
  This email is: [ ] blogable [x] ask first [ ] private.
  Sent from Mountain View, California, United States




-- 
Abraham Williams | http://the.hackerconundrum.com
Hacker | http://abrah.am | http://twitter.com/abraham
Web608 | Community Evangelist | http://web608.org
This email is: [ ] blogable [x] ask first [ ] private.
Sent from San Francisco, California, United States


[twitter-dev] Re: OAuth example in Java language

2009-05-19 Thread surya


hi,

The problem exists still  can you suggest me a solution to
integrate my Twitter4j oauth in google app engine..
I am a beginner, so it will be helpful if anyone could suggest me how
to start

sravanthi.


On May 18, 6:29 pm, surya sravanthi sravanthi.su...@gmail.com wrote:
 hi,

 Thanks for your code. I have noticied that twitter.setAccessToken
 is not available in the Twitter.java in Twitter4j-2.0.3 version.
 I have tried using the instructions given in this link below:

 I think this will be helpful...
 This is working on localhost.. but I need my application which is in
 java to be deployed on google app engine. found that this is
 giving

   com.service.TwitterOAuthException:
 java.security.AccessControlException: access denied
 (java.lang.RuntimePermission modifyThreadGroup)

 exception.. can ou suggest me a method i could use to solve this 
 problem

 Thanks again..
 SravanthiOn Tue, May 5, 2009 at 11:51 AM, Yusuke yus...@mac.com wrote:

  Hi,

  I wrote an OAuth example code for Java language.
 http://yusuke.homeip.net/twitter4j/en/code-examples.html#oauth

  I hope you caln add the link to the following page.
 http://apiwiki.twitter.com/OAuth-Examples

  Cheers,
  Yusuke


[twitter-dev] credential checking

2009-05-19 Thread Omkaaraa

Hello,

only thing I want to do is using my own J2ME quivalent API, I want to
check the user credential. I have read about OAuth also.

So i have to gone through this link http://twitter.com/account/
verify_credentials.xml
but this is the file which i will get in response, but in which format
or how I will send username and password?

Till now I have learn that thru OAuth  i have to generate some key and
token. but didnt understand much about it.

Earlier also I had told that I am very much new. but I got some hi-fi
answers of my questions not straight forward.

So, if possible, please give your valuable time and provide me some
information about it. For you guys, this will be a pretty silly
question but for me its important because this is the start.

Please help me.

Thanks and regards,
Niraj


[twitter-dev] Re: Twitter4J 2.0.4 released - added Streaming API support fixed OAuth compatibility issue

2009-05-19 Thread AJ Chen
Yusuke, thank you for providing twitter4j api. it's very useful.
-aj

On Tue, May 19, 2009 at 2:07 AM, Yusuke Yamamoto yus...@mac.com wrote:

 Hi all,

 Twitter4J 2.0.4 is available for download.
 http://yusuke.homeip.net/twitter4j/en/index.html#download
 It's also available at the Maven central repository.
 http://repo1.maven.org/maven2/net/homeip/yusuke/twitter4j/

 Previous versions have a compatibility issue with OAuth since May 13th.
 Projects requiring OAuth support need to migrate to this version.

 Compatibility notes:
 - retirement of ExtendedUser class
 Following methods return User, or ListUser instead of ExtendedUser, or
 ListExtendedUser:
 getUserDetail()
 verifyCredentials()
 updateProfile()
 updateProfileColors()
 getBlockingUsers()
 getAuthenticatedUser()

 The method signatures of TwitterListener and TwitterAdapter are changed
 accordingly.

 ExtendedUser and UserWithStatus class are retired(deleted) since the
 API returns extended user information with all methods.
 Use User class instead.

 - Streaming API support
 Now Twitter4J supports the Streaming API which is in alpha test phase.
 http://apiwiki.twitter.com/Streaming-API-Documentation
 Please read the above document from top to bottom carefully before you dive
 into 
 TwitterStreamhttp://yusuke.homeip.net/twitter4j/en/javadoc/twitter4j/TwitterStream.html
 .
 Note that the Streaming API is subject to change.

 Release Notes - Twitter4J - Version 2.0.4 - HTML formatBug

- [TFJ-142 http://yusuke.homeip.net/jira/browse/TFJ-142] -
DocumentBuilder.parse is not thread safe : NullPointerException at
AbstractDOMParser.startElement
- [TFJ-145 http://yusuke.homeip.net/jira/browse/TFJ-145] -
twitter4j.http.Response shouldn't be Serializable
- [TFJ-146 http://yusuke.homeip.net/jira/browse/TFJ-146] -
getUserDetail should be invocable from unauthenticated Twitter instances
- [TFJ-149 http://yusuke.homeip.net/jira/browse/TFJ-149] - OAuth
fails with Invalid / expired Token after May 13, 2009

 Improvement

- [TFJ-147 http://yusuke.homeip.net/jira/browse/TFJ-147] - retire
ExtendedUser and UserWithStatus

 New Feature

- [TFJ-139 http://yusuke.homeip.net/jira/browse/TFJ-139] - streaming
API support beta
- [TFJ-144 http://yusuke.homeip.net/jira/browse/TFJ-144] - Add
methods to retrieve blocking information

 Task

- [TFJ-143 http://yusuke.homeip.net/jira/browse/TFJ-143] -
Deprecation of following and notification elements


 Have fun!
 --
 Yusuke Yamamoto
 yus...@mac.com
 follow me at http://twitter.com/yusukeyamamoto




-- 
AJ Chen, PhD
Co-Chair, Semantic Web SIG, sdforum.org
Technical Architect, healthline.com
http://web2express.org
Palo Alto, CA


[twitter-dev] Our own redirecting URL is being changed to a bit.ly URL

2009-05-19 Thread Nancy M

I'm using perl (NET::Twitter) to submit a status update.  The update
consists of a text string and a URL of our tracker module.  The
purpose of this is to allow us to track any sales that arise as a
result of the clickthrough and associate them with the source.

It appears that the URL is being changed:

The source reads (for instance)
Added Item: 5.25 carats princess diamond pave engagement ring new
http://tias.com/cgi-bin/tw.fcgi/itemKey=3923612043

where http://tias.com/cgi-bin/tw.fcgi/itemKey=3923612043 is the key to
our tracker and the page that is eventually served is
http://www.earthling.com/13527/PictPage/3923612043.html  (that latter
was determined from http://www.earthling.com/13527/PictPage/3923612043.html)
which is a very very handy tool, I must say.

However, when I interrogate the text from twitter, it turns out that
our URL has been changed to a bit.ly one:

p $result-{text}
Added Item: 5.25 carats princess diamond pave engagement ring new
http://bit.ly/11qkU1

I've dug down through the LWP::userAgent level and it seriously
appears that this change is happening at Twitter

Firstly, it isn't on our bit.ly account (and I really don't want to
use bit.ly for this) and second why is this happening?

Any advice?

Am I missing something critical in the documentation someplace?


[twitter-dev] Re: Our own redirecting URL is being changed to a bit.ly URL

2009-05-19 Thread Chad Etzel

You are correct, Twitter is doing the bit.ly conversion on their end.
They automatically shorten URLs based on some set of metrics (I think
character length and formatting have something to do with it), and
there's no (current) way to suppress this behavior when posting.

The best you can do is use the bit.ly API to un-shorten the link and
grab your URL key from there.

Have a look at the /expand method in their API:
http://code.google.com/p/bitly-api/wiki/ApiDocumentation

-Chad

On Tue, May 19, 2009 at 6:04 PM, Nancy M nmira...@gmail.com wrote:

 I'm using perl (NET::Twitter) to submit a status update.  The update
 consists of a text string and a URL of our tracker module.  The
 purpose of this is to allow us to track any sales that arise as a
 result of the clickthrough and associate them with the source.

 It appears that the URL is being changed:

 The source reads (for instance)
 Added Item: 5.25 carats princess diamond pave engagement ring new
 http://tias.com/cgi-bin/tw.fcgi/itemKey=3923612043

 where http://tias.com/cgi-bin/tw.fcgi/itemKey=3923612043 is the key to
 our tracker and the page that is eventually served is
 http://www.earthling.com/13527/PictPage/3923612043.html  (that latter
 was determined from http://www.earthling.com/13527/PictPage/3923612043.html)
 which is a very very handy tool, I must say.

 However, when I interrogate the text from twitter, it turns out that
 our URL has been changed to a bit.ly one:

 p $result-{text}
 Added Item: 5.25 carats princess diamond pave engagement ring new
 http://bit.ly/11qkU1

 I've dug down through the LWP::userAgent level and it seriously
 appears that this change is happening at Twitter

 Firstly, it isn't on our bit.ly account (and I really don't want to
 use bit.ly for this) and second why is this happening?

 Any advice?

 Am I missing something critical in the documentation someplace?



[twitter-dev] Re: Our own redirecting URL is being changed to a bit.ly URL

2009-05-19 Thread Abraham Williams
If you don't want to use bit.ly shorten the urls with the shortener of your
choice first.



When did Twitter switch to using bit.ly anyways?

On Tue, May 19, 2009 at 17:24, Chad Etzel jazzyc...@gmail.com wrote:


 You are correct, Twitter is doing the bit.ly conversion on their end.
 They automatically shorten URLs based on some set of metrics (I think
 character length and formatting have something to do with it), and
 there's no (current) way to suppress this behavior when posting.

 The best you can do is use the bit.ly API to un-shorten the link and
 grab your URL key from there.

 Have a look at the /expand method in their API:
 http://code.google.com/p/bitly-api/wiki/ApiDocumentation

 -Chad

 On Tue, May 19, 2009 at 6:04 PM, Nancy M nmira...@gmail.com wrote:
 
  I'm using perl (NET::Twitter) to submit a status update.  The update
  consists of a text string and a URL of our tracker module.  The
  purpose of this is to allow us to track any sales that arise as a
  result of the clickthrough and associate them with the source.
 
  It appears that the URL is being changed:
 
  The source reads (for instance)
  Added Item: 5.25 carats princess diamond pave engagement ring new
  http://tias.com/cgi-bin/tw.fcgi/itemKey=3923612043
 
  where http://tias.com/cgi-bin/tw.fcgi/itemKey=3923612043 is the key to
  our tracker and the page that is eventually served is
  http://www.earthling.com/13527/PictPage/3923612043.html  (that latter
  was determined from
 http://www.earthling.com/13527/PictPage/3923612043.html)
  which is a very very handy tool, I must say.
 
  However, when I interrogate the text from twitter, it turns out that
  our URL has been changed to a bit.ly one:
 
  p $result-{text}
  Added Item: 5.25 carats princess diamond pave engagement ring new
  http://bit.ly/11qkU1
 
  I've dug down through the LWP::userAgent level and it seriously
  appears that this change is happening at Twitter
 
  Firstly, it isn't on our bit.ly account (and I really don't want to
  use bit.ly for this) and second why is this happening?
 
  Any advice?
 
  Am I missing something critical in the documentation someplace?
 




-- 
Abraham Williams | http://the.hackerconundrum.com
Hacker | http://abrah.am | http://twitter.com/abraham
Web608 | Community Evangelist | http://web608.org
This email is: [ ] blogable [x] ask first [ ] private.


[twitter-dev] Re: Our own redirecting URL is being changed to a bit.ly URL

2009-05-19 Thread Cameron Kaiser

 The best you can do is use the bit.ly API to un-shorten the link and
 grab your URL key from there.
 
 Have a look at the /expand method in their API:
 http://code.google.com/p/bitly-api/wiki/ApiDocumentation

Or, implement your own URL shortening scheme (either internally, or using
a specific service that meets your needs), with the assumption that the
shortening will occur and at least this way you can control the situation
under how the shortening is handled.

-- 
 personal: http://www.cameronkaiser.com/ --
  Cameron Kaiser * Floodgap Systems * www.floodgap.com * ckai...@floodgap.com
-- MOVIE IDEA: The E-mail Signature Who Loved Me --


[twitter-dev] Re: Our own redirecting URL is being changed to a bit.ly URL

2009-05-19 Thread Chad Etzel

On Tue, May 19, 2009 at 10:47 PM, Abraham Williams 4bra...@gmail.com wrote:

 When did Twitter switch to using bit.ly anyways?

Sometime last week, if I recall.  Looking at the stats for spammy
links is incredible... people will click anything (tho I can't tell
how many of the clicks are actually other twitter link tracking
services like twitturly, etc).
-Chad


[twitter-dev] Re: How would I automatically DM to a person once theyve followed me?

2009-05-19 Thread Coonay

nice to hear the solution

On May 20, 12:09 am, Ryan Tuosto ryantuo...@gmail.com wrote:
 Well how does TweetLater do it?  They don't have access to client emails.

 On Mon, May 18, 2009 at 9:53 PM, Swaroop rh.swar...@gmail.com wrote:

  Email is your only real time option here.

  On May 19, 7:45 am, Ryan Tuosto ryantuo...@gmail.com wrote:
   What is the best way to do this in real time?

   On Mon, May 18, 2009 at 6:38 PM, Abraham Williams 4bra...@gmail.com
  wrote:
Then you use option b.

Sent from my adp1

On May 18, 2009 6:21 PM, Ryan Tuosto ryantuo...@gmail.com wrote:

Ok, but if I'm writing this as a service, I don't have access to other
people's emails.

 On Mon, May 18, 2009 at 5:19 PM, Abraham Williams 4bra...@gmail.com
wrote:   A) parse the new ...