[twitter-dev] Warning on search requests- has the Search API changed?

2010-10-25 Thread eco_bach
Hi
Started getting the following warning recently on a Twitter search
appliance I built
adjusted since_id to  (2010-10-13 18:00:00
UTC), requested since_id was older than allowed
A sample query which gives the above warning contains the following
name value pairs-
q
tag
lang   'en'
since  '2010-010-20'
12:27:26  '2010-010-20'
rpp   '100'
Has something changed in the Twitter search API? Can someone
enlighten
me?

-- 
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] Q: Twitter:warning response on search

2010-10-25 Thread eco_bach
Hi
Started getting the following warning recently on a Twitter search
appliance I built
adjusted since_id to  (2010-10-13 18:00:00
UTC), requested since_id was older than allowed
A sample query which gives the above warning contains the following
name value pairs-
q
tag
lang   'en'
since  '2010-010-20'
12:27:26  '2010-010-20'
rpp   '100'
Has something changed in the Twitter search API? Can someone
enlighten
me?

-- 
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: Converting to oAuth / xAuth from Progress Open Edge applications

2010-10-25 Thread Martin Hannah
Another test unsuccessful:
I was reading a post that spoke of Consumer key becoming "poisen" so I
tried adding another application consumer/secret key combination to
the twitter account and using these new Consumer and Secret keys, but
I still cant get a response from twitter when requesting and access
token...

NOTE:
This same program was working before oAuth xAuth came in... so the
problem is with the xAuth credentials validation.
AND: When I use the values in Twitter documentation it produces the
same base string, signature and authorization parameters as displayed
in dev.twitter.com/pages/xauth .?

Can anyone help ..?

On Oct 24, 9:55 am, Martin Hannah  wrote:
> Hi Matt,
>
> Thanks for the response, I went back and looked closely at the
> possible trouble spots you suggested (the epoch time, the consumer
> key, the parameters not repeated) and its all fine.
>
> I used the program to produce epoc time and compared these 
> tohttp://unixtimestamp.com/index.phpand was producing the same number
> as that website at the same moment in time.
>
> I beleive my signature generator is working as well, because when I
> use the values from the examples inhttp://dev.twitter.com/pages/xauth
> orhttp://dev.twitter.com/pages/authI get the same number produced as
> on those twitter doco web pages.
>
> I then tried to use xAuth in the hope that it would provide some
> insight. I sent email to twitter and they enabled xAuth for me.
>
> Next step was to use the same variables fromhttp://dev.twitter.com/pages/xauth
> and copy/paste the actual results fromhttp://dev.twitter.com/pages/xauth
> to variables and running my procedure, and then inside the procedure
> do string character comparison at various points in the program to the
> values  that twitter suggested would be produced 
> onhttp://dev.twitter.com/pages/xauth
> to confirm my program produced the same thing (and it did).
>
> I then inserted my Consumer key, use name, password etc and sent the
> post tohttps://api.twitter.com/oauth/access_tokenand I get no
> response (literally nothing, not even an error message).
>
> The base string is :
> POST&https%3A%2F%2Fapi.twitter.com%2Foauth
> %2Faccess_token&oauth_consumer_key%3DTY0Js5vMc04HNqmqIkNEnQ
> %26oauth_nonce%3DRiu39H4LlIeFbEgExKFAGnZk4AhNP05Kvz87Xeu6pyN
> %26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
> %3D1287877307%26oauth_version%3D1.0%26x_auth_mode%3Dclient_auth
> %26x_auth_password%3D%26x_auth_username%3Dx
>
> The program paramaters generated are:
> v-params = OAuth oauth_consumer_key="TY0Js5vMc04HNx",
> oauth_nonce="lJUAbSfIQY3ybDkkTITFGj2tga0ZCsFKxrTjEo9Sz7L",
> oauth_signature="EdFxq%2B7cT1ilXDva4QCZhfXlRfo%3D",
> oauth_signature_method="HMAC-SHA1", oauth_timestamp="1287876800",
> oauth_version="1.0"
> (The order of the Authorization header parameters shown above differs
> from the examples in tritter documentation but I changed to the exact
> same order as in Twitter doco and it did not work)
>
> My post code is:
>     define var objHTTP  as com-handle.
>     Create "Microsoft.XMLHTTP" objHTTP .
>
>     objHTTP:open("POST",api-atokin, false, api-username, api-
> password).
>     objHTTP:setRequestHeader('Authorization', v-params).
>
>     objHTTP:send("").
>
>      v-response = objHTTP:responseText .
>
> I am stumped, and would appreciate any suggestions as to where to go
> from here...
>
>
>
> Matt Harris wrote:
> > Hi Martin,
>
> > In the example you give the timestamp you are using converts to one
> > from the year 1971 so you want to check how you are creating that. The
> > correct timestamp value is the current epoch time in seconds.
>
> > Without seeing your basestring it is difficult to know what could be
> > going wrong. One thing to check is that your signing key is correct.
> > The signing key format is "YOUR_CONSUMER_SECRET&THE_USER_SECRET". When
> > requesting a token you don't have a user secret so the signing key
> > becomes "YOUR_CONSUMER_KEY&".
>
> > Also make sure you are not sending the OAuth parameters more than
> > once. As the parameters are in the Authorization header they shouldn't
> > be included in any GET or POST parameters.
>
> > Best
>
> > @themattharris
> > Developer Advocate, Twitter
> >http://twitter.com/themattharris
>
> > On Wed, Oct 6, 2010 at 4:37 PM, Martin 
> > Hannahbegin_of_the_skype_highlighting end_of_the_skype_highlighting
> >  wrote:
> > > We are converting our Twitter interfaces to oAuth and from the advise
> > > onhttp://twittervb.codeplex.com/wikipage?title=XAuthwe are heading
> > > down the path of xAuth for our desk top applications that use Twitter.
>
> > > We opted not to use TwitterVB.dll for backward compatibility of older
> > > sites, so we are faced with a DIY situation.
>
> > > Even though we are intending to use xAuth, we have had to build
> > > libraries that will handle the authentication and signature of the
> > > messages, so as a first step we are attempting to replicate the
> > > request token as explained 

[twitter-dev] Re: Snowflake: An update and some very important information

2010-10-25 Thread Matt Harris
Hey everyone,

Further to this mornings email, the Search API now contains the _str
representations of it's IDs.

Best
@themattharris
Developer Advocate, Twitter
http://twitter.com/themattharris


On Mon, Oct 25, 2010 at 1:33 PM, Matt Harris wrote:

> The Search API hasn't rolled those fields in yet but they are due soon. The
> API does include these fields but as Tim has highlighted the xyz/ids methods
> don't yet have a String version.
>
> The engineering teams are aware of this and are working on it. I'll post an
> update once those additional responses have the fields.
>
> Thanks for noticing they were missing and commenting on the thread.
>
> @themattharris
> Developer Advocate, Twitter
> http://twitter.com/themattharris
>
>
> On Mon, Oct 25, 2010 at 3:28 AM, Johannes la Poutre wrote:
>
>> @Themattharris: was there any change to the implementation timeline?
>> Quote: "by 22nd October 2010 (Friday): String versions of ID numbers
>> will start appearing in the API responses"
>>
>> I'm still not seeing id_str, to_user_id_str  and from_user_id_str etc.
>> in the current search API output, example:
>>
>> http://search.twitter.com/search.json?geocode=52.155018%2C4.487658%2C1km
>>
>> is there an updated timeline or did I miss something?
>>
>> Best,
>>
>> -- Johannes / @jlapoutre / @tweepsaround
>>
>>
>> On Oct 19, 2:19 am, Matt Harris  wrote:
>> > Last week you may remember Twitter planned to enable the new Status ID
>> > generator - 'Snowflake' but didn't. The purpose of this email is to
>> explain
>> > the reason why this didn't happen, what we are doing about it, and what
>> the
>> > new release plan is.
>> >
>> > So what is Snowflake?
>> > --
>> > Snowflake is a service we will be using to generate unique Tweet IDs.
>> These
>> > Tweet IDs are unique 64bit unsigned integers, which, instead of being
>> > sequential like the current IDs, are based on time. The full ID is
>> composed
>> > of a timestamp, a worker number, and a sequence number.
>> >
>> > The problem
>> > -
>> > Before launch it came to our attention that some programming languages
>> such
>> > as Javascript cannot support numbers with >53bits. This can be easily
>> > examined by running a command similar to: (90071992547409921).toString()
>> in
>> > your browsers console or by running the following JSON snippet through
>> your
>> > JSON parser.
>> >
>> > {"id": 10765432100123456789, "id_str": "10765432100123456789"}
>> >
>> > In affected JSON parsers the ID will not be converted successfully and
>> will
>> > lose accuracy. In some parsers there may even be an exception.
>> >
>> > The solution
>> > 
>> > To allow javascript and JSON parsers to read the IDs we need to include
>> a
>> > string version of any ID when responding in the JSON format. What this
>> means
>> > is Status, User, Direct Message and Saved Search IDs in the Twitter API
>> will
>> > now be returned as an integer and a string in JSON responses. This will
>> > apply to the main Twitter API, the Streaming API and the Search API.
>> >
>> > For example, a status object will now contain an id and an id_str. The
>> > following JSON representation of a status object shows the two versions
>> of
>> > the ID fields for each data point.
>> >
>> > [
>> >   {
>> > "coordinates": null,
>> > "truncated": false,
>> > "created_at": "Thu Oct 14 22:20:15 + 2010",
>> > "favorited": false,
>> > "entities": {
>> >   "urls": [
>> >   ],
>> >   "hashtags": [
>> >   ],
>> >   "user_mentions": [
>> > {
>> >   "name": "Matt Harris",
>> >   "id": 777925,
>> >   "id_str": "777925",
>> >   "indices": [
>> > 0,
>> > 14
>> >   ],
>> >   "screen_name": "themattharris"
>> > }
>> >   ]
>> > },
>> > "text": "@themattharris hey how are things?",
>> > "annotations": null,
>> > "contributors": [
>> >   {
>> > "id": 819797,
>> > "id_str": "819797",
>> > "screen_name": "episod"
>> >   }
>> > ],
>> > "id": 12738165059,
>> > "id_str": "12738165059",
>> > "retweet_count": 0,
>> > "geo": null,
>> > "retweeted": false,
>> > "in_reply_to_user_id": 777925,
>> > "in_reply_to_user_id_str": "777925",
>> > "in_reply_to_screen_name": "themattharris",
>> > "user": {
>> >   "id": 6253282
>> >   "id_str": "6253282"
>> > },
>> > "source": "web",
>> > "place": null,
>> > "in_reply_to_status_id": 12738040524
>> > "in_reply_to_status_id_str": "12738040524"
>> >   }
>> > ]
>> >
>> > What should you do - RIGHT NOW
>> > --
>> > The first thing you should do is attempt to decode the JSON snippet
>> above
>> > using your production code parser. Observe the output to confirm the ID
>> has
>> > not lost accuracy.
>> >
>> > What you do next depends on what happens:
>> >
>> > * If your co

[twitter-dev] Re: delimited=length on user streams w/ GET?

2010-10-25 Thread Igor Clark
Hello folks,

Without any further clues on thus, I just went ahead and re-
implemented (read: hacked up) my own version the Phirehose consume()
method to read the chunk-encoded responses coming in off the wire. It
seems reliable on a low volume of data; the API seems to send status
messages as HTTP chunks, and "keep-alive"/pad CRLF lines every so
often. I'll knock something up to follow loads of users and get a
bigger stream coming through, to see how well it holds up.

However it would still be great to know if this parameter is somehow
supported in the user stream via OAuth GET URLs; this checksum would
give me greater confidence about the parsing, unless someone can let
me know that the status-lengths-plus-CRLF-as-chunk-sizes approach is
in fact a valid one.

Cheers,
Igor

On Oct 20, 4:36 pm, Igor Clark  wrote:
> Hi there,
>
> I've got the following requests responding happily:
>
> https://userstream.twitter.com/2/user.json?oauth_consumer_key=xxx...
>
> I'm using a slightly modified version of TwitterOAuth to generate the
> signed requests, and have modded Phirehose to use the GET URL and do
> the stream stuff, but am not having any luck getting the
> delimited=length parameter to work using GET on the user stream in
> this manner. Using curl, the above URLs work as expected and stream
> chunked-encoding JSON down the wire at me, but if I add
> "&delimited=length" as another URL parameter, I get immediate 401s.
>
> Do I need to use POST and specific OAuth request headers in order to
> be able to use the "delimited" functionality, or should this work as
> is?
>
> Many thanks,
> Igor

-- 
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: Streaming API, Basic Auth Ok, OAuth Unauthorized?

2010-10-25 Thread Ciaran
On Mon, Oct 25, 2010 at 11:28 PM, themattharris
 wrote:
> Hey everyone,
>
> So OAuth encoding can get confusing and lead to situations like this
> so i'll go through a very verbose walkthrough to hopefully explain how
> it all works.

First, thank you for taking the time to post this, I agree OAuth can
be /  is  confusing ;)

>
> The key section of the specification explaining this part is
> 3.4.1.3.2:
>    http://tools.ietf.org/html/rfc5849#section-3.4.1.3.2
>
> Assuming my parameters are POST parameters and are as follows:
>
> key | value
> 
> track | twitter
> follow | 1528912,9512582
> oauth_consumer_key | Oauth_Consumer_Key
> oauth_nonce | nonce123
> oauth_signature_method | HMAC-SHA1
> oauth_timestamp | 1288042714
> oauth_token | My_tokeN
> oauth_version | 1.0
>
> Now following 3.4.1.3.2
> 1. Parameter names and values are encoded according to Section 3.6.
> Section 3.6 of the spec says:
> "The values are then escaped using the [RFC3986] percent-encoding
> (%XX) mechanism as follows:
>  *  Characters in the unreserved character set as defined by
> [RFC3986], Section 2.3 (ALPHA, DIGIT, "-", ".", "_", "~") MUST NOT be
> encoded.
>  *  All other characters MUST be encoded.
>  *  The two hexadecimal characters used to represent encoded
> characters MUST be uppercase."
>
> Knowing this our parameters therefore become:
> key | value
> 
> track | twitter
> follow | 11528912%2C9512582
> oauth_consumer_key | OauthConsumerKey
> oauth_nonce | nonce123
> oauth_signature_method | HMAC-SHA1
> oauth_timestamp | 1288042714
> oauth_token | My_tokeN
> oauth_version | 1.0
>
> 2. The parameters are sorted by name, using ascending byte value
> ordering.  If two or more parameters share the same name, they are
> sorted by their value.
>
> key | value
> 
> follow | 11528912%2C9512582
> oauth_consumer_key | OauthConsumerKey
> oauth_nonce | nonce123
> oauth_signature_method | HMAC-SHA1
> oauth_timestamp | 1288042714
> oauth_token | My_tokeN
> oauth_version | 1.0
> track | twitter
>
> 3. The name of each parameter is concatenated to its corresponding
> value using an "=" character (ASCII code 61) as a separator, even if
> the value is empty.
>
> key=value
> 
> follow=11528912%2C9512582
> oauth_consumer_key=OauthConsumerKey
> oauth_nonce=nonce123
> oauth_signature_method=HMAC-SHA1
> oauth_timestamp=1288042714
> oauth_token=My_tokeN
> oauth_version=1.0
> track=twitter
>
> 4. The sorted name/value pairs are concatenated together into a single
> string by using an "&" character (ASCII code 38) as separator.

Indeed, Steps 1,2, 3 + 4 as described above are the ones I know from
the Spec, however on this page: http://dev.twitter.com/pages/auth %3d
and %26 are used during the concatenation process, and ...

>
> follow=11528912%2C9512582&oauth_consumer_key=OauthConsumerKey&oauth_nonce=nonce123&oauth_signature_method=HMAC-
> SHA1&oauth_timestamp=1288042714&oauth_token=My_tokeN&oauth_version=1.0&track=twitter
>
>
> This concatenated string of parameters is the result of the
> normalization part of 3.4.1.1.5. We still have to complete stage 5
> which says to encode that string.

... This step apparently does not occur ? (again according to that
web-page)... it appears that it is considered equivalent to escape the
'&' and the '=' during the loop, rather than escape the whole string
at once (which will re-escape the individually escaped keys and values
as per [I believe] the spec)

>
> Doing this gives:
> follow%3D11528912%252C9512582%26oauth_consumer_key%3DOauthConsumerKey
> %26oauth_nonce%3Dnonce123%26oauth_signature_method%3DHMAC-
> SHA1%26oauth_timestamp%3D1288042714%26oauth_token%3DMy_tokeN
> %26oauth_version%3D1.0%26track%3Dtwitter
>
> In this example, assuming we are POSTing to 
> http://stream.twitter.com/1/statuses/filter.json
> with the parameters already processed - our basestring becomes:
>
> POST&http%3A%2F%2Fstream.twitter.com%2F1%2Fstatuses
> %2Ffilter.json&follow%3D11528912%252C9512582%26oauth_consumer_key
> %3DOauthConsumerKey%26oauth_nonce%3Dnonce123%26oauth_signature_method
> %3DHMAC-SHA1%26oauth_timestamp%3D1288042714%26oauth_token%3DMy_tokeN
> %26oauth_version%3D1.0%26track%3Dtwitter
>
> I hope that helps,
> @themattharris

It will do, if what you say is happening is what *really* happens on
the server (and that web page is wrong / or I mis-understand it) ..
then I'll have to find some other reason why escaping the url
parameters fixes things ;)

Cheery-bye, and again, thank you for taking the time to talk this through :)

-cj

-- 
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: Streaming API, Basic Auth Ok, OAuth Unauthorized?

2010-10-25 Thread themattharris
Hey everyone,

So OAuth encoding can get confusing and lead to situations like this
so i'll go through a very verbose walkthrough to hopefully explain how
it all works.

The key section of the specification explaining this part is
3.4.1.3.2:
http://tools.ietf.org/html/rfc5849#section-3.4.1.3.2

Assuming my parameters are POST parameters and are as follows:

key | value

track | twitter
follow | 1528912,9512582
oauth_consumer_key | Oauth_Consumer_Key
oauth_nonce | nonce123
oauth_signature_method | HMAC-SHA1
oauth_timestamp | 1288042714
oauth_token | My_tokeN
oauth_version | 1.0

Now following 3.4.1.3.2
1. Parameter names and values are encoded according to Section 3.6.
Section 3.6 of the spec says:
"The values are then escaped using the [RFC3986] percent-encoding
(%XX) mechanism as follows:
  *  Characters in the unreserved character set as defined by
[RFC3986], Section 2.3 (ALPHA, DIGIT, "-", ".", "_", "~") MUST NOT be
encoded.
  *  All other characters MUST be encoded.
  *  The two hexadecimal characters used to represent encoded
characters MUST be uppercase."

Knowing this our parameters therefore become:
key | value

track | twitter
follow | 11528912%2C9512582
oauth_consumer_key | OauthConsumerKey
oauth_nonce | nonce123
oauth_signature_method | HMAC-SHA1
oauth_timestamp | 1288042714
oauth_token | My_tokeN
oauth_version | 1.0

2. The parameters are sorted by name, using ascending byte value
ordering.  If two or more parameters share the same name, they are
sorted by their value.

key | value

follow | 11528912%2C9512582
oauth_consumer_key | OauthConsumerKey
oauth_nonce | nonce123
oauth_signature_method | HMAC-SHA1
oauth_timestamp | 1288042714
oauth_token | My_tokeN
oauth_version | 1.0
track | twitter

3. The name of each parameter is concatenated to its corresponding
value using an "=" character (ASCII code 61) as a separator, even if
the value is empty.

key=value

follow=11528912%2C9512582
oauth_consumer_key=OauthConsumerKey
oauth_nonce=nonce123
oauth_signature_method=HMAC-SHA1
oauth_timestamp=1288042714
oauth_token=My_tokeN
oauth_version=1.0
track=twitter

4. The sorted name/value pairs are concatenated together into a single
string by using an "&" character (ASCII code 38) as separator.

follow=11528912%2C9512582&oauth_consumer_key=OauthConsumerKey&oauth_nonce=nonce123&oauth_signature_method=HMAC-
SHA1&oauth_timestamp=1288042714&oauth_token=My_tokeN&oauth_version=1.0&track=twitter


This concatenated string of parameters is the result of the
normalization part of 3.4.1.1.5. We still have to complete stage 5
which says to encode that string.

Doing this gives:
follow%3D11528912%252C9512582%26oauth_consumer_key%3DOauthConsumerKey
%26oauth_nonce%3Dnonce123%26oauth_signature_method%3DHMAC-
SHA1%26oauth_timestamp%3D1288042714%26oauth_token%3DMy_tokeN
%26oauth_version%3D1.0%26track%3Dtwitter

In this example, assuming we are POSTing to 
http://stream.twitter.com/1/statuses/filter.json
with the parameters already processed - our basestring becomes:

POST&http%3A%2F%2Fstream.twitter.com%2F1%2Fstatuses
%2Ffilter.json&follow%3D11528912%252C9512582%26oauth_consumer_key
%3DOauthConsumerKey%26oauth_nonce%3Dnonce123%26oauth_signature_method
%3DHMAC-SHA1%26oauth_timestamp%3D1288042714%26oauth_token%3DMy_tokeN
%26oauth_version%3D1.0%26track%3Dtwitter

I hope that helps,
@themattharris



On Oct 25, 3:20 pm, "bradley.meck"  wrote:
> Correct, I still had the issue when escaping "track=...". Escaping
> params individually did not work either. Still able to tweet though...
> Maybe it is a hint at the trouble being more/different than double
> encoding?
>
> Cheers,
> Bradley
>
> On Oct 25, 4:59 pm, Ciaran  wrote:
>
>
>
>
>
>
>
> > On Mon, Oct 25, 2010 at 10:53 PM, bradley.meck  
> > wrote:
> > > So in my case i just encodeURIComponent somewhere? I tried on the POST
> > > params and it did not work, nor did the 4 permutations of api-key/
> > > secret and access-token-key/secret.
>
> > Odd, Escaping "track="+tracking.join(",")+"&count=0" should work ?
> > -cj.

-- 
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: Streaming API, Basic Auth Ok, OAuth Unauthorized?

2010-10-25 Thread bradley.meck
Correct, I still had the issue when escaping "track=...". Escaping
params individually did not work either. Still able to tweet though...
Maybe it is a hint at the trouble being more/different than double
encoding?

Cheers,
Bradley

On Oct 25, 4:59 pm, Ciaran  wrote:
> On Mon, Oct 25, 2010 at 10:53 PM, bradley.meck  wrote:
> > So in my case i just encodeURIComponent somewhere? I tried on the POST
> > params and it did not work, nor did the 4 permutations of api-key/
> > secret and access-token-key/secret.
>
> Odd, Escaping "track="+tracking.join(",")+"&count=0" should work ?
> -cj.

-- 
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] OAuth

2010-10-25 Thread Hcc_dev
I was using the basic Auth (twitterAPI.php )in a form that is used by
our security office to send emergency information to our students.
This form is used to send messages to email, text messages and to
twitter.  I need to get this back up as soon as possible and have
spent several days trying to figure out Oauth.  Is there a step by
step for those of us who were using the basic auth?   I read
http://dev.twitter.com/pages/basic_to_oauth but it is very general and
does not tell me how to do this.  Should I us TwitterOAuth library?  I
do not understand the call back URL.  I don’t want the user (which is
one of 5 staff members) to have to do anything other than send the
form.  Please help.  .

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] Re: Streaming API, Basic Auth Ok, OAuth Unauthorized?

2010-10-25 Thread Ciaran
On Mon, Oct 25, 2010 at 10:53 PM, bradley.meck  wrote:
> So in my case i just encodeURIComponent somewhere? I tried on the POST
> params and it did not work, nor did the 4 permutations of api-key/
> secret and access-token-key/secret.

Odd, Escaping "track="+tracking.join(",")+"&count=0" should work ?
-cj.

-- 
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: Streaming API, Basic Auth Ok, OAuth Unauthorized?

2010-10-25 Thread bradley.meck
So in my case i just encodeURIComponent somewhere? I tried on the POST
params and it did not work, nor did the 4 permutations of api-key/
secret and access-token-key/secret.
.
On Oct 25, 4:31 pm, Ciaran  wrote:
> Hey Bradley,
>
> This is another instance of the the ongoing (and as yet un-answered
> sadly) question I have in the mailing list about  my client (which
> iirc you're using)
>
> See :
>    http://github.com/ciaranj/node-oauth/issues#issue/7
> and
>    http://groups.google.co.uk/group/twitter-development-talk/browse_thre...
> oh and also ( :( )
>    http://groups.google.co.uk/group/twitter-development-talk/browse_thre...
>
> The bad news is twitter don't seem to want to tell me if I'm wrong, or
> they're wrong (I don't care, just want to know what to fix ! :( ) ..
> the good news is the work around is to url encode your parameters
> before you pass them off to my client ( you won't need to do this with
> any other OAuth provider I've yet come across fwiw, but if they come
> back and say yes, thats deliberate, yes its different, I'll hardcode
> it into the client so you don't need to worry about it *sigh* (or even
> better, the client is wrong, we're right and we do it the same as
> everyone else..which would be an ideal outcome) )
>
> Take Care
> - cj.
>
>
>
>
>
>
>
> On Mon, Oct 25, 2010 at 10:20 PM, bradley.meck  wrote:
> > I have a simple oauth client that I use to post status updates
> > currently, however, when I added the ability to track statuses with
> > the Stream api using OAuth I noticed I could not connect, with
> > Unauthorized 401 being the reply to anything I sent it. I looked into
> > the documentation and it seems to be a simple request using the same
> > OAuth style as the normal api. After searching threads I noticed the
> > rate limiting and so I have left my app alone for extended periods of
> > time and still I get 401s. I tested against basic auth, and the code
> > worked! M, that was odd. So unless I am mistaken I am doing
> > something wrong, but I am posting to the right url and mirroring my
> > basic auth test to no avail. The code is at:
>
> >http://github.com/bmeck/Simple-Bot/blob/master/modules/twitter.js
> > the track() function is the boilerplate that is in question
> > oa.post is a simple rest wrapper for oauth POST.
>
> > Any help or directions as to where to go from here is much
> > appreciated.
>
> > Cheers,
> > Bradley
>
> > --
> > Twitter developer documentation and resources:http://dev.twitter.com/doc
> > API updates via Twitter:http://twitter.com/twitterapi
> > Issues/Enhancements Tracker:http://code.google.com/p/twitter-api/issues/list
> > Change your membership to this 
> > group:http://groups.google.com/group/twitter-development-talk

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] Streaming API, Basic Auth Ok, OAuth Unauthorized?

2010-10-25 Thread Ciaran
Hey Bradley,

This is another instance of the the ongoing (and as yet un-answered
sadly) question I have in the mailing list about  my client (which
iirc you're using)

See :
   http://github.com/ciaranj/node-oauth/issues#issue/7
and
   
http://groups.google.co.uk/group/twitter-development-talk/browse_thread/thread/fe6e50d60d1e95fa/f06e93e761183bf1?hl=en&lnk=gst&q=javajunky#f06e93e761183bf1
oh and also ( :( )
   
http://groups.google.co.uk/group/twitter-development-talk/browse_thread/thread/4aedc185cee34d81?hl=en#

The bad news is twitter don't seem to want to tell me if I'm wrong, or
they're wrong (I don't care, just want to know what to fix ! :( ) ..
the good news is the work around is to url encode your parameters
before you pass them off to my client ( you won't need to do this with
any other OAuth provider I've yet come across fwiw, but if they come
back and say yes, thats deliberate, yes its different, I'll hardcode
it into the client so you don't need to worry about it *sigh* (or even
better, the client is wrong, we're right and we do it the same as
everyone else..which would be an ideal outcome) )

Take Care
- cj.


On Mon, Oct 25, 2010 at 10:20 PM, bradley.meck  wrote:
> I have a simple oauth client that I use to post status updates
> currently, however, when I added the ability to track statuses with
> the Stream api using OAuth I noticed I could not connect, with
> Unauthorized 401 being the reply to anything I sent it. I looked into
> the documentation and it seems to be a simple request using the same
> OAuth style as the normal api. After searching threads I noticed the
> rate limiting and so I have left my app alone for extended periods of
> time and still I get 401s. I tested against basic auth, and the code
> worked! M, that was odd. So unless I am mistaken I am doing
> something wrong, but I am posting to the right url and mirroring my
> basic auth test to no avail. The code is at:
>
> http://github.com/bmeck/Simple-Bot/blob/master/modules/twitter.js
> the track() function is the boilerplate that is in question
> oa.post is a simple rest wrapper for oauth POST.
>
> Any help or directions as to where to go from here is much
> appreciated.
>
> Cheers,
> Bradley
>
> --
> 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] Streaming API, Basic Auth Ok, OAuth Unauthorized?

2010-10-25 Thread bradley.meck
I have a simple oauth client that I use to post status updates
currently, however, when I added the ability to track statuses with
the Stream api using OAuth I noticed I could not connect, with
Unauthorized 401 being the reply to anything I sent it. I looked into
the documentation and it seems to be a simple request using the same
OAuth style as the normal api. After searching threads I noticed the
rate limiting and so I have left my app alone for extended periods of
time and still I get 401s. I tested against basic auth, and the code
worked! M, that was odd. So unless I am mistaken I am doing
something wrong, but I am posting to the right url and mirroring my
basic auth test to no avail. The code is at:

http://github.com/bmeck/Simple-Bot/blob/master/modules/twitter.js
the track() function is the boilerplate that is in question
oa.post is a simple rest wrapper for oauth POST.

Any help or directions as to where to go from here is much
appreciated.

Cheers,
Bradley

-- 
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: Empty responses

2010-10-25 Thread Matt Harris
When querying for users directly using users/show we will indicate if they
are suspended or not. If they are deleted it's as if they never existed so
you will get a 404. For methods such as timeline responses, and
followers/friends, suspended and deleted users are filtered out.

Remember a suspended user can be reinstated, and that users can change their
screen_name leading to 404s if you query for them in that way. Assuming a
user is deleted or suspended permanently using users/show is not sensible,
and you should instead rely on Twitter filtering the users out of other
responses (such as followers/friends/timelines).

As for the missing users could you please add the screen_names to this
ticket in our issue tracker:
http://code.google.com/p/twitter-api/issues/detail?id=1784

Best
@themattharris
Developer Advocate, Twitter
http://twitter.com/themattharris


On Mon, Oct 25, 2010 at 12:59 PM, Slate Smith  wrote:

> Gotcha, I'll write in a class to test for suspension/deletion etc.
>
> On Oct 25, 2010, at 3:51 PM, Tim wrote:
>
>  I believe users/show returns with status 403, with "user has been
>> suspended" in the text
>>
>> On Oct 25, 5:19 pm, Slate Smith  wrote:
>>
>>> I haven't seen a method for checking a suspended or deleted account
>>> yet. If anyone knows of a "hack" for that it would be nice. Messes w/
>>> metrics etc.
>>>
>>
>> --
>> Twitter developer documentation and resources: http://dev.twitter.com/doc
>> API updates via Twitter: http://twitter.com/twitterapi
>> Issues/Enhancements Tracker:
>> http://code.google.com/p/twitter-api/issues/list
>> Change your membership to this group:
>> http://groups.google.com/group/twitter-development-talk
>>
>
> --
> Twitter developer documentation and resources: http://dev.twitter.com/doc
> API updates via Twitter: http://twitter.com/twitterapi
> Issues/Enhancements Tracker:
> http://code.google.com/p/twitter-api/issues/list
> Change your membership to this group:
> http://groups.google.com/group/twitter-development-talk
>

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] WHAT THE HELL ARE YOU THINKING

2010-10-25 Thread Adriaan Pelzer
I won't recommend using oAuth for desktop clients. This requires you to
store your client secret in the app, rendering your users' Twitter accounts
vulnerable.

Adriaan Pelzer
RAAK
putting you in touch with your crowds
http://www.wewillraakyou.com
twitter: http://www.twitter.com/adriaan_pelzer
linkedIn: http://uk.linkedin.com/pub/adriaan-pelzer/4/874/860/
skype: adriaan_pelzer
+4478 7978 1743



On Mon, Oct 25, 2010 at 9:33 PM, Tom van der Woerdt  wrote:

> xAuth is an extension to OAuth. OAuth is for both desktop and web
> clients, while xAuth is only for desktop clients.
>
> Tom
>
>
> On 10/25/10 10:29 PM, Adriaan Pelzer wrote:
> > Agreed, xAuth is mainly for desktop clients. oAuth mainly for web
> clients.
> >
> > And you don't use HTML with oAuth. You choose between XML or JSON. It
> > gets served via HTTP (RESTful API), but no HTML involved.
> >
> > This is a perfect problem for C/C++
> >
> > Adriaan Pelzer
> > RAAK
> > putting you in touch with your crowds
> > http://www.wewillraakyou.com
> > twitter: http://www.twitter.com/adriaan_pelzer
> > linkedIn: http://uk.linkedin.com/pub/adriaan-pelzer/4/874/860/
> > skype: adriaan_pelzer
> > +4478 7978 1743
> >
> >
> >
> > On Mon, Oct 25, 2010 at 9:14 PM, Jim Cortez  > > wrote:
> >
> >  Use xAuth: http://dev.twitter.com/pages/xauth
> > No web server required.
> > Jim
> >
> >
> > On 10/25/10 12:28 PM, Keiya Bachhuber wrote:
> >
> > Is the next version of twitter going to be written in C++ and
> > use GTK+
> > for rendering? Because that's what you're asking desktop
> > developers to
> > do by forcing OAuth. I have to include a web server in my app to
> > work
> > with twitter? What the hell! It's probably simpler just to
> > pretend to
> > be Chrome or Firefox. Seriously. Working through the mess that
> > is HTML
> > (any HTML, not just yours) is easier than getting the nice clean
> > feeds.
> >
> > Good job. You made me hate you.
> > Keiya.
> >
> >
> > --
> > Twitter developer documentation and resources:
> > http://dev.twitter.com/doc
> > API updates via Twitter: http://twitter.com/twitterapi
> > Issues/Enhancements Tracker:
> > http://code.google.com/p/twitter-api/issues/list
> > Change your membership to this group:
> > http://groups.google.com/group/twitter-development-talk
> >
> >
> > --
> > Twitter developer documentation and resources:
> http://dev.twitter.com/doc
> > API updates via Twitter: http://twitter.com/twitterapi
> > Issues/Enhancements Tracker:
> > http://code.google.com/p/twitter-api/issues/list
> > Change your membership to this group:
> > http://groups.google.com/group/twitter-development-talk
>
> --
> Twitter developer documentation and resources: http://dev.twitter.com/doc
> API updates via Twitter: http://twitter.com/twitterapi
> Issues/Enhancements Tracker:
> http://code.google.com/p/twitter-api/issues/list
> Change your membership to this group:
> http://groups.google.com/group/twitter-development-talk
>

-- 
Twitter 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] Callback never called with the Streaming API

2010-10-25 Thread Matt Harris
Hi Tobias,

First thing to do is make sure you have the most recent version of the
library. I'm actively developing it and adding various features/utilities to
it.

Secondly, take a look at the Streaming API example here:

http://github.com/themattharris/tmhOAuth/blob/master/examples/streaming.php

Give the example script a try - the library was built around that example
(remember to fill in your consumer and user tokens and secrets). If you
still have problems let me know on the Github project page issues:
http://github.com/themattharris/tmhOAuth

Best,

@themattharris
Developer Advocate, Twitter
http://twitter.com/themattharris


On Mon, Oct 25, 2010 at 9:16 AM, Tobias C. Jensen <2bia...@gmail.com> wrote:

> Hi guys.
>
> I've been digging into the Twitter API using Themattharris's excellent
> PHP class a lot these past two weeks.
>
> Everything has been fine with standard OAuth calls, but now I would
> like to make use of the User Stream - which the class appearently
> supports. However, nothing is returned when I do try the following:
>
> 
>
> tmhOAuth->streaming_request('GET', 'http://stream.twitter.com/1/
> statuses/sample.json', array(
>'count'  => 10,
> ), 'test_callback');
>
> function test_callback($p) {
>echo 'Now printing: ';
>print_r($p);
>ob_flush();
> }
>
> 
>
> I get a status code '200', but test_callback is never called. If I do
> not set a parameter, I receive an error status, so it seems like it
> ought to work.
>
> Is there a kind person out there, who can get me on the right path, or
> am I completely off track here? :) I've been struggling with this all
> day and haven't been able to find a solution anywhere online. I have
> found a couple of examples that seem to do exactly what I do, but with
> succes.
>
> Thanks in advance - and for the many useful answers I have already
> found here!
> - Tobias
>
> --
> 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: Snowflake: An update and some very important information

2010-10-25 Thread Matt Harris
The Search API hasn't rolled those fields in yet but they are due soon. The
API does include these fields but as Tim has highlighted the xyz/ids methods
don't yet have a String version.

The engineering teams are aware of this and are working on it. I'll post an
update once those additional responses have the fields.

Thanks for noticing they were missing and commenting on the thread.

@themattharris
Developer Advocate, Twitter
http://twitter.com/themattharris


On Mon, Oct 25, 2010 at 3:28 AM, Johannes la Poutre wrote:

> @Themattharris: was there any change to the implementation timeline?
> Quote: "by 22nd October 2010 (Friday): String versions of ID numbers
> will start appearing in the API responses"
>
> I'm still not seeing id_str, to_user_id_str  and from_user_id_str etc.
> in the current search API output, example:
>
> http://search.twitter.com/search.json?geocode=52.155018%2C4.487658%2C1km
>
> is there an updated timeline or did I miss something?
>
> Best,
>
> -- Johannes / @jlapoutre / @tweepsaround
>
>
> On Oct 19, 2:19 am, Matt Harris  wrote:
> > Last week you may remember Twitter planned to enable the new Status ID
> > generator - 'Snowflake' but didn't. The purpose of this email is to
> explain
> > the reason why this didn't happen, what we are doing about it, and what
> the
> > new release plan is.
> >
> > So what is Snowflake?
> > --
> > Snowflake is a service we will be using to generate unique Tweet IDs.
> These
> > Tweet IDs are unique 64bit unsigned integers, which, instead of being
> > sequential like the current IDs, are based on time. The full ID is
> composed
> > of a timestamp, a worker number, and a sequence number.
> >
> > The problem
> > -
> > Before launch it came to our attention that some programming languages
> such
> > as Javascript cannot support numbers with >53bits. This can be easily
> > examined by running a command similar to: (90071992547409921).toString()
> in
> > your browsers console or by running the following JSON snippet through
> your
> > JSON parser.
> >
> > {"id": 10765432100123456789, "id_str": "10765432100123456789"}
> >
> > In affected JSON parsers the ID will not be converted successfully and
> will
> > lose accuracy. In some parsers there may even be an exception.
> >
> > The solution
> > 
> > To allow javascript and JSON parsers to read the IDs we need to include a
> > string version of any ID when responding in the JSON format. What this
> means
> > is Status, User, Direct Message and Saved Search IDs in the Twitter API
> will
> > now be returned as an integer and a string in JSON responses. This will
> > apply to the main Twitter API, the Streaming API and the Search API.
> >
> > For example, a status object will now contain an id and an id_str. The
> > following JSON representation of a status object shows the two versions
> of
> > the ID fields for each data point.
> >
> > [
> >   {
> > "coordinates": null,
> > "truncated": false,
> > "created_at": "Thu Oct 14 22:20:15 + 2010",
> > "favorited": false,
> > "entities": {
> >   "urls": [
> >   ],
> >   "hashtags": [
> >   ],
> >   "user_mentions": [
> > {
> >   "name": "Matt Harris",
> >   "id": 777925,
> >   "id_str": "777925",
> >   "indices": [
> > 0,
> > 14
> >   ],
> >   "screen_name": "themattharris"
> > }
> >   ]
> > },
> > "text": "@themattharris hey how are things?",
> > "annotations": null,
> > "contributors": [
> >   {
> > "id": 819797,
> > "id_str": "819797",
> > "screen_name": "episod"
> >   }
> > ],
> > "id": 12738165059,
> > "id_str": "12738165059",
> > "retweet_count": 0,
> > "geo": null,
> > "retweeted": false,
> > "in_reply_to_user_id": 777925,
> > "in_reply_to_user_id_str": "777925",
> > "in_reply_to_screen_name": "themattharris",
> > "user": {
> >   "id": 6253282
> >   "id_str": "6253282"
> > },
> > "source": "web",
> > "place": null,
> > "in_reply_to_status_id": 12738040524
> > "in_reply_to_status_id_str": "12738040524"
> >   }
> > ]
> >
> > What should you do - RIGHT NOW
> > --
> > The first thing you should do is attempt to decode the JSON snippet above
> > using your production code parser. Observe the output to confirm the ID
> has
> > not lost accuracy.
> >
> > What you do next depends on what happens:
> >
> > * If your code converts the ID successfully without losing accuracy you
> are
> > OK but should consider converting to the _str versions of IDs as soon as
> > possible.
> > * If your code has lost accuracy, convert your code to using the _str
> > version immediately. If you do not do this your code will be unable to
> > interact with the Twitter API reliably.
> > * In some language parsers, the JSON may throw an excep

Re: [twitter-dev] WHAT THE HELL ARE YOU THINKING

2010-10-25 Thread Tom van der Woerdt
xAuth is an extension to OAuth. OAuth is for both desktop and web
clients, while xAuth is only for desktop clients.

Tom


On 10/25/10 10:29 PM, Adriaan Pelzer wrote:
> Agreed, xAuth is mainly for desktop clients. oAuth mainly for web clients.
> 
> And you don't use HTML with oAuth. You choose between XML or JSON. It
> gets served via HTTP (RESTful API), but no HTML involved.
> 
> This is a perfect problem for C/C++
> 
> Adriaan Pelzer
> RAAK
> putting you in touch with your crowds
> http://www.wewillraakyou.com
> twitter: http://www.twitter.com/adriaan_pelzer
> linkedIn: http://uk.linkedin.com/pub/adriaan-pelzer/4/874/860/
> skype: adriaan_pelzer
> +4478 7978 1743
> 
> 
> 
> On Mon, Oct 25, 2010 at 9:14 PM, Jim Cortez  > wrote:
> 
>  Use xAuth: http://dev.twitter.com/pages/xauth
> No web server required.
> Jim
> 
> 
> On 10/25/10 12:28 PM, Keiya Bachhuber wrote:
> 
> Is the next version of twitter going to be written in C++ and
> use GTK+
> for rendering? Because that's what you're asking desktop
> developers to
> do by forcing OAuth. I have to include a web server in my app to
> work
> with twitter? What the hell! It's probably simpler just to
> pretend to
> be Chrome or Firefox. Seriously. Working through the mess that
> is HTML
> (any HTML, not just yours) is easier than getting the nice clean
> feeds.
> 
> Good job. You made me hate you.
> Keiya.
> 
> 
> -- 
> Twitter developer documentation and resources:
> http://dev.twitter.com/doc
> API updates via Twitter: http://twitter.com/twitterapi
> Issues/Enhancements Tracker:
> http://code.google.com/p/twitter-api/issues/list
> Change your membership to this group:
> http://groups.google.com/group/twitter-development-talk
> 
> 
> -- 
> Twitter developer documentation and resources: http://dev.twitter.com/doc
> API updates via Twitter: http://twitter.com/twitterapi
> Issues/Enhancements Tracker:
> http://code.google.com/p/twitter-api/issues/list
> Change your membership to this group:
> http://groups.google.com/group/twitter-development-talk

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] WHAT THE HELL ARE YOU THINKING

2010-10-25 Thread Adriaan Pelzer
Agreed, xAuth is mainly for desktop clients. oAuth mainly for web clients.

And you don't use HTML with oAuth. You choose between XML or JSON. It gets
served via HTTP (RESTful API), but no HTML involved.

This is a perfect problem for C/C++

Adriaan Pelzer
RAAK
putting you in touch with your crowds
http://www.wewillraakyou.com
twitter: http://www.twitter.com/adriaan_pelzer
linkedIn: http://uk.linkedin.com/pub/adriaan-pelzer/4/874/860/
skype: adriaan_pelzer
+4478 7978 1743



On Mon, Oct 25, 2010 at 9:14 PM, Jim Cortez  wrote:

>  Use xAuth: http://dev.twitter.com/pages/xauth
> No web server required.
> Jim
>
>
> On 10/25/10 12:28 PM, Keiya Bachhuber wrote:
>
>> Is the next version of twitter going to be written in C++ and use GTK+
>> for rendering? Because that's what you're asking desktop developers to
>> do by forcing OAuth. I have to include a web server in my app to work
>> with twitter? What the hell! It's probably simpler just to pretend to
>> be Chrome or Firefox. Seriously. Working through the mess that is HTML
>> (any HTML, not just yours) is easier than getting the nice clean
>> feeds.
>>
>> Good job. You made me hate you.
>> Keiya.
>>
>>
> --
> Twitter developer documentation and resources: http://dev.twitter.com/doc
> API updates via Twitter: http://twitter.com/twitterapi
> Issues/Enhancements Tracker:
> http://code.google.com/p/twitter-api/issues/list
> Change your membership to this group:
> http://groups.google.com/group/twitter-development-talk
>

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] WHAT THE HELL ARE YOU THINKING

2010-10-25 Thread Jim Cortez

 Use xAuth: http://dev.twitter.com/pages/xauth
No web server required.
Jim

On 10/25/10 12:28 PM, Keiya Bachhuber wrote:

Is the next version of twitter going to be written in C++ and use GTK+
for rendering? Because that's what you're asking desktop developers to
do by forcing OAuth. I have to include a web server in my app to work
with twitter? What the hell! It's probably simpler just to pretend to
be Chrome or Firefox. Seriously. Working through the mess that is HTML
(any HTML, not just yours) is easier than getting the nice clean
feeds.

Good job. You made me hate you.
Keiya.



--
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: WHAT THE HELL ARE YOU THINKING

2010-10-25 Thread Slate Smith
Hah @ "can I recommend the following book "How to win friends and  
influence people".. It's a good read...


Also Keiya, Twitter is a Web App, and the majority of people jumping  
on the trail are WEB DEVELOPERS. They don't want to use C++ and GTK++.  
I can't even imagine having to waste the time coding a two hour OAuth  
app [Dave..] in C++ and having to use GTK+ as my UI. ./make ./make  
install blah -


On Oct 25, 2010, at 4:00 PM, Dave-twiends wrote:


As I fellow developer I'll say I fully support the drive to OAuth.

It's a lot more secure and although it might mean that you actually
have to write a few lines of code it will help stamp out a lot issues
with straight usernames and passwords..

OAuth took me total of about 2 hours to implement, what's the big
deal...?

Good luck Keiya, can I recommend the following book "How to win
friends and influence people".. It's a good read...

On Oct 25, 8:28 pm, Keiya Bachhuber  wrote:
Is the next version of twitter going to be written in C++ and use  
GTK+
for rendering? Because that's what you're asking desktop developers  
to

do by forcing OAuth. I have to include a web server in my app to work
with twitter? What the hell! It's probably simpler just to pretend to
be Chrome or Firefox. Seriously. Working through the mess that is  
HTML

(any HTML, not just yours) is easier than getting the nice clean
feeds.

Good job. You made me hate you.
Keiya.


--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] Poor experience in Streaming API

2010-10-25 Thread Slate Smith
There was a super insane outage and percentage of calls with all  
aspects of the api yesterday and saturday, it was killing me. no idea  
on why ...


On Oct 25, 2010, at 3:59 PM, Augusto Santos wrote:


Hi folks,

I'm getting poor experience in Streaming API with status/filter  
using locations.

A abnormal low status rate Since 5pm UTC.

Anyone with the same problem?

Thanks, Augusto.

--
http://geotweets.gemeos.org/
氣


--
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] Poor experience in Streaming API

2010-10-25 Thread Augusto Santos
Hi folks,

I'm getting poor experience in Streaming API with status/filter using
locations.
A abnormal low status rate Since 5pm UTC.

Anyone with the same problem?

Thanks, Augusto.

-- 
http://geotweets.gemeos.org/
氣

-- 
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: WHAT THE HELL ARE YOU THINKING

2010-10-25 Thread Dave-twiends
As I fellow developer I'll say I fully support the drive to OAuth.

It's a lot more secure and although it might mean that you actually
have to write a few lines of code it will help stamp out a lot issues
with straight usernames and passwords..

OAuth took me total of about 2 hours to implement, what's the big
deal...?

Good luck Keiya, can I recommend the following book "How to win
friends and influence people".. It's a good read...

On Oct 25, 8:28 pm, Keiya Bachhuber  wrote:
> Is the next version of twitter going to be written in C++ and use GTK+
> for rendering? Because that's what you're asking desktop developers to
> do by forcing OAuth. I have to include a web server in my app to work
> with twitter? What the hell! It's probably simpler just to pretend to
> be Chrome or Firefox. Seriously. Working through the mess that is HTML
> (any HTML, not just yours) is easier than getting the nice clean
> feeds.
>
> Good job. You made me hate you.
> Keiya.

-- 
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: Empty responses

2010-10-25 Thread Slate Smith

Gotcha, I'll write in a class to test for suspension/deletion etc.
On Oct 25, 2010, at 3:51 PM, Tim wrote:


I believe users/show returns with status 403, with "user has been
suspended" in the text

On Oct 25, 5:19 pm, Slate Smith  wrote:

I haven't seen a method for checking a suspended or deleted account
yet. If anyone knows of a "hack" for that it would be nice. Messes w/
metrics etc.


--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] WHAT THE HELL ARE YOU THINKING

2010-10-25 Thread Slate Smith
On Twitter's behalf, how many clients are using it for Desktop Apps?  
If you can't embed a web server [like AIR does also] then well ...


HTML is pretty standard and simple. It also helps rapidly deploy apps.  
If you're worried, you should be using Adobe AIR and AS3.0. GTK+? The  
avg developer isn't a linux nerd and or c++ programmer. It's asking a  
lot and would limit versus enhance the developer experience.


Check out ActionScript 3.0. You can write an App in AS3 no flash  
timeline and embed a web server there's your GTK without forcing  
anyone else to use C++/GTK+.


I'm going to guess that less than .01% of all Apps using the api are  
desktop based.


Stop being a bitch, and instead understand their position and quite  
possibly try and learn a scripting language that would help you in  
your endeavors. Also, aside from TweetDeck; I haven't seen one  
application yet where the application gains an advantage by being  
Desktop Based. Buy Oreilly's ActionScript 3.0 and bust out an app with  
AIR. Stop crying and start learning.


On Oct 25, 2010, at 3:28 PM, Keiya Bachhuber wrote:


Is the next version of twitter going to be written in C++ and use GTK+
for rendering? Because that's what you're asking desktop developers to
do by forcing OAuth. I have to include a web server in my app to work
with twitter? What the hell! It's probably simpler just to pretend to
be Chrome or Firefox. Seriously. Working through the mess that is HTML
(any HTML, not just yours) is easier than getting the nice clean
feeds.

Good job. You made me hate you.
Keiya.

--
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: Empty responses

2010-10-25 Thread Tim
I believe users/show returns with status 403, with "user has been
suspended" in the text

On Oct 25, 5:19 pm, Slate Smith  wrote:
> I haven't seen a method for checking a suspended or deleted account  
> yet. If anyone knows of a "hack" for that it would be nice. Messes w/  
> metrics etc.

-- 
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] WHAT THE HELL ARE YOU THINKING

2010-10-25 Thread Keiya Bachhuber
Is the next version of twitter going to be written in C++ and use GTK+
for rendering? Because that's what you're asking desktop developers to
do by forcing OAuth. I have to include a web server in my app to work
with twitter? What the hell! It's probably simpler just to pretend to
be Chrome or Firefox. Seriously. Working through the mess that is HTML
(any HTML, not just yours) is easier than getting the nice clean
feeds.

Good job. You made me hate you.
Keiya.

-- 
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 across Twitter Lists or home timeline?

2010-10-25 Thread Slate Smith
yes. iterate through and slam all their tweets into an array or db  
with unique tweet text values and run your searches through there ...


On Oct 25, 2010, at 3:37 PM, Quy wrote:


Is there a way for me to run a search across tweets from users I'm
following or users on a list? I was thinking of using DataSift but
they don't support lists (you have to pass in individual screen names
to run a search)

Thanks,
Quy
@quytennis

--
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] Search across Twitter Lists or home timeline?

2010-10-25 Thread Quy
Is there a way for me to run a search across tweets from users I'm
following or users on a list? I was thinking of using DataSift but
they don't support lists (you have to pass in individual screen names
to run a search)

Thanks,
Quy
@quytennis

-- 
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] don't work twitter api

2010-10-25 Thread Slate Smith

Old session?

On Oct 25, 2010, at 3:06 AM, Иван Каптюк wrote:

Почему Twitter не дает oauth_token, когда я  
пытаюсь его получит
отсылая свой key и secret. Выдает "This page is no  
longer valid. It

looks like someone already used the token information you provided.
Please return to the site that sent you to this page and try again ...
it was probably an honest mistake." С тем же кодом  
делаю запрос на

rutvit, соединение авторизуется. help..

--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


--
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: Help for twitteroauth

2010-10-25 Thread Slate Smith

Put in breaks in Abrahams lib and example and see where you're failing.

On Oct 23, 2010, at 4:50 PM, Vishnu S wrote:


Hi Abraham.. im using your twitterauth. Ive got everything set right,
but im also getting the error as mentioned about. One thing i noticed
is that the url is:
https://twitter.com/oauth/authorize?oauth_token=

i dont find the token. What might have gone wrong?

Regards
vishnu

On Sep 20, 8:11 am, Abraham Williams <4bra...@gmail.com> wrote:
 "Could not connect to Twitter. Refresh the page or try again  
later." with
TwitterOAuth generally means one of several things. You don't have  
a valid
consumer key/secret being used, there is a firewall blocking access  
from
your server tohttps://api.twitter.com, or your servers time is not  
being

automatically synced.

Abraham
-
Abraham Williams | Hacker Advocate |http://abrah.am
@abraham |http://projects.abrah.am|http://blog.abrah.am
This email is: [ ] shareable [x] ask first [ ] private.



On Wed, Sep 15, 2010 at 01:42, kilotto  wrote:

Hi all,



I'm trying use twitteroauth but I have some problems.



When I use twitter twitteroauth in my webserver (
http://twitter.domain.net
)  the script display the error: "Could not connect to Twitter.
Refresh the page or try again later.".


If I use other script, it display: "Woah there! This page is no  
longer

valid. It looks like someone already used the token information you
provided. Please return to the site that sent you to this page and  
try

again ... it was probably an honest mistake."



I've tried twitteroauth in local and it works fine.



How I can fix this ?



Tnx!



--
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?hl=en


--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] Empty responses

2010-10-25 Thread Slate Smith
I haven't seen a method for checking a suspended or deleted account  
yet. If anyone knows of a "hack" for that it would be nice. Messes w/  
metrics etc.


On Oct 25, 2010, at 11:04 AM, Tim wrote:


My cron jobs are picking up failures pulling specific users.
The response body is empty, and the response status is 200

examples:
http://api.twitter.com/1/users/show/cinebot.json
http://api.twitter.com/1/users/show/silenteye.json

Perhaps these users are suspended, or something, but I'm not happy
removing these users from my system unless I see a 403, or 404.

--
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] Callback never called with the Streaming API

2010-10-25 Thread Tobias C. Jensen
Hi guys.

I've been digging into the Twitter API using Themattharris's excellent
PHP class a lot these past two weeks.

Everything has been fine with standard OAuth calls, but now I would
like to make use of the User Stream - which the class appearently
supports. However, nothing is returned when I do try the following:



tmhOAuth->streaming_request('GET', 'http://stream.twitter.com/1/
statuses/sample.json', array(
'count'  => 10,
), 'test_callback');

function test_callback($p) {
echo 'Now printing: ';
print_r($p);
ob_flush();
}



I get a status code '200', but test_callback is never called. If I do
not set a parameter, I receive an error status, so it seems like it
ought to work.

Is there a kind person out there, who can get me on the right path, or
am I completely off track here? :) I've been struggling with this all
day and haven't been able to find a solution anywhere online. I have
found a couple of examples that seem to do exactly what I do, but with
succes.

Thanks in advance - and for the many useful answers I have already
found here!
- Tobias

-- 
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] friends/ids and followers/ids not working in oauth

2010-10-25 Thread Slate Smith
Instead of the console, if you are running some type of linux or unix  
[unix on osx/mac - terminal], just write a simple function to display  
results. i just have a function to grab a file or array and just use  
php to print_r(jsonfilehereorarray);


On Oct 25, 2010, at 10:23 AM, Taylor Singletary wrote:

The console on dev.twitter.com is unreliable. I recommend using  
Apigee's great Twitter console instead http://app.apigee.com/console/twitter


http://app.apigee.com/console/twitter#apimet=http%3A//api.twitter.com/1/friends/ids.json%3Fuser_id%3D1497__apiidx__%3Dnull__apisecure__%3Dtrue__apiprovider__%3Dtwitter 
 for a good example.


We're working on showing our current bug-ridden console who's boss.

Taylor

On Mon, Oct 25, 2010 at 1:28 AM, jlezard   
wrote:

Hello,

If you use the console to call the method friends/ids (like
http://api.twitter.com/1/friends/ids.json?user_id=12345
) it no longer returns a nicely formated json, in fact it returns
something completly wrong like 4 ids for someone who has 250
friends

I was heavily relying on this method for my app,  is there going to be
a fix to this ?


Thanks a lot



Note: I can still get the friend ids with basic auth but then the
limit is 150 which is not sufficient.

--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] Certificate Twitter Apps

2010-10-25 Thread Slate Smith

They can't even respond to Whitelisting requests. Good luck.

On Oct 23, 2010, at 7:56 PM, loretoparisi wrote:


Hi,
I'm cto for stickphone.me and lyricsmood.me, oauth based twitter apps.

Many users told us that they just don't use our oauth sign in service,
since it seems to them to be unsafe with this kind of sign in (single
sign-on from oauth client site)

This is not a design problem I guess, but a people misunderstanding
problem, about the authorization protocol (going away from people like
developers, engineers, etc, who really knows what oAuth is about?),
even if we tried to explain this process as well in our sites tos.

I was wondering if you @twitter have any idea in the future to
certificate an app in order this app to be "verified" by twitter (in
the same way some accounts are).

In this ways app users would not be scared when clickin on "Sign in to
Twitter" buttons.

Of course using Twitter's button styles would be a better experience
for the user in order to trust the thirdy-party service, but this is
not possibile in all cases.

Thanks,
Loreto Parisi
CTO at stickphone, lyricsmood
lor...@stickphone.me
lor...@lyricsmood.me

--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] Re: Snowflake: An update and some very important information

2010-10-25 Thread Slate Smith

It's there. But for some reason now in all types of json requests -

On Oct 25, 2010, at 6:28 AM, Johannes la Poutre wrote:


@Themattharris: was there any change to the implementation timeline?
Quote: "by 22nd October 2010 (Friday): String versions of ID numbers
will start appearing in the API responses"

I'm still not seeing id_str, to_user_id_str  and from_user_id_str etc.
in the current search API output, example:

http://search.twitter.com/search.json?geocode=52.155018%2C4.487658%2C1km

is there an updated timeline or did I miss something?

Best,

-- Johannes / @jlapoutre / @tweepsaround


On Oct 19, 2:19 am, Matt Harris  wrote:
Last week you may remember Twitter planned to enable the new Status  
ID
generator - 'Snowflake' but didn't. The purpose of this email is to  
explain
the reason why this didn't happen, what we are doing about it, and  
what the

new release plan is.

So what is Snowflake?
--
Snowflake is a service we will be using to generate unique Tweet  
IDs. These

Tweet IDs are unique 64bit unsigned integers, which, instead of being
sequential like the current IDs, are based on time. The full ID is  
composed

of a timestamp, a worker number, and a sequence number.

The problem
-
Before launch it came to our attention that some programming  
languages such

as Javascript cannot support numbers with >53bits. This can be easily
examined by running a command similar to:  
(90071992547409921).toString() in
your browsers console or by running the following JSON snippet  
through your

JSON parser.

{"id": 10765432100123456789, "id_str": "10765432100123456789"}

In affected JSON parsers the ID will not be converted successfully  
and will

lose accuracy. In some parsers there may even be an exception.

The solution

To allow javascript and JSON parsers to read the IDs we need to  
include a
string version of any ID when responding in the JSON format. What  
this means
is Status, User, Direct Message and Saved Search IDs in the Twitter  
API will
now be returned as an integer and a string in JSON responses. This  
will

apply to the main Twitter API, the Streaming API and the Search API.

For example, a status object will now contain an id and an id_str.  
The
following JSON representation of a status object shows the two  
versions of

the ID fields for each data point.

[
  {
"coordinates": null,
"truncated": false,
"created_at": "Thu Oct 14 22:20:15 + 2010",
"favorited": false,
"entities": {
  "urls": [
  ],
  "hashtags": [
  ],
  "user_mentions": [
{
  "name": "Matt Harris",
  "id": 777925,
  "id_str": "777925",
  "indices": [
0,
14
  ],
  "screen_name": "themattharris"
}
  ]
},
"text": "@themattharris hey how are things?",
"annotations": null,
"contributors": [
  {
"id": 819797,
"id_str": "819797",
"screen_name": "episod"
  }
],
"id": 12738165059,
"id_str": "12738165059",
"retweet_count": 0,
"geo": null,
"retweeted": false,
"in_reply_to_user_id": 777925,
"in_reply_to_user_id_str": "777925",
"in_reply_to_screen_name": "themattharris",
"user": {
  "id": 6253282
  "id_str": "6253282"
},
"source": "web",
"place": null,
"in_reply_to_status_id": 12738040524
"in_reply_to_status_id_str": "12738040524"
  }
]

What should you do - RIGHT NOW
--
The first thing you should do is attempt to decode the JSON snippet  
above
using your production code parser. Observe the output to confirm  
the ID has

not lost accuracy.

What you do next depends on what happens:

* If your code converts the ID successfully without losing accuracy  
you are
OK but should consider converting to the _str versions of IDs as  
soon as

possible.
* If your code has lost accuracy, convert your code to using the _str
version immediately. If you do not do this your code will be unable  
to

interact with the Twitter API reliably.
* In some language parsers, the JSON may throw an exception when  
reading the
ID value. If this happens in your parser you will need to ‘pre- 
parse’ the

data, removing or replacing ID parameters with their _str versions.

Summary
-
1) If you develop in Javascript, know that you will have to update  
your code

to read the string version instead of the integer version.

2) If you use a JSON decoder, validate that the example JSON,  
above, decodes
without throwing exceptions. If exceptions are thrown, you will  
need to
pre-parse the data. Please let us know the name, version, and  
language of

the parser which throws the exception so we can investigate.

Timeline
---
by 22nd October 2010 (Friday): String versions of ID numbers will  
start

appearing in the API responses
4th November 2010 (Thursday) : Snowflake will be turned o

Re: [twitter-dev] friends/ids and followers/ids not working in oauth

2010-10-25 Thread Slate Smith
there is a current ticket on ids, also did you notice the newer id_str  
versus id, use that -

and don't use the console it's limiting.

$parameters = array("screen_name" => "BARACKOBAMA", "cursor" =>  
$cursor);

$method = "followers/ids";
$followers = $this->connection->get($method, $parameters);

Max return of 5000 ids minus suspended users. More than 5000, paginate  
with next_cursor_str and start with "cursor" always being "-1" the  
first page, this will be eventually deprecated and automatic in all  
requests as pagination cursor being "-1" [it's a string]


- Slate

On Oct 25, 2010, at 4:28 AM, jlezard wrote:


Hello,

If you use the console to call the method friends/ids (like
http://api.twitter.com/1/friends/ids.json?user_id=12345
) it no longer returns a nicely formated json, in fact it returns
something completly wrong like 4 ids for someone who has 250
friends

I was heavily relying on this method for my app,  is there going to be
a fix to this ?


Thanks a lot



Note: I can still get the friend ids with basic auth but then the
limit is 150 which is not sufficient.

--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] Search by screen name or name?

2010-10-25 Thread Slate Smith

You can use followers/ids friends/ids and specify a user -
You can do statuses/followers/ to grab s bunch of metadata either by  
id_str or screen_name


with both provide obviously supply the id or screen_name and other  
options accordingly.


- Slate.

On Oct 25, 2010, at 6:07 AM, Christian Fazzini wrote:


What API method should I use to search for users based on screen name
or name?

Currently, the API only offers search by screen name and twitter id...

--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] Status Update - Error - 500 Internal Server Error

2010-10-25 Thread Slate Smith

Don't post your keys online :P

I get 500s randomly. Not sure why. Very randomly and not often.

On Oct 25, 2010, at 8:05 AM, Anandhev wrote:


Hi,

I get the error while sending "Status Update" request. Details are
shown below.

Sometimes, I get proper responses when i exclude "Authorization
signature ". But most of the time, I get the following error.

My request and response is attached. Kindly help us to fix this issue.

Thanks,

--Request 
POST /1/statuses/update.xml?status=success HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Authorization: OAuth realm="Twitter
API
",oauth_version
=
"1.0
",oauth_nonce
="981E91F",oauth_timestamp="1288007529",oauth_signature_method="HMAC-
SHA1
",oauth_consumer_key
=
"7vMm4YKEgAWhLCkkvpjchA
",oauth_consumer_secret
="BX4LciPyn0czUKvQXQWhy7YUyzGqywqFO9UclJ5mX0",oauth_token="146432631-
AsYHO57Hyrh1m94f6DQhUkWsR8LMtTHlznHCWJ7C
",oauth_token_secret
=
"ZJpq4ZtIb9iODytUHGUHBwC5pnVQXhkEcIX8b58I1A
",oauth_signature="FyoCCQwsu5XZHR09Dx6fV2Oh
+uw="
Host: api.twitter.com
Content-Length: 0
Connection: Keep-Alive


--Response
HTTP/1.1 500 Internal Server Error
Date: Mon, 25 Oct 2010 11:54:56 GMT
Server: hi
Status: 500 Internal Server Error
Content-Type: text/html; charset=utf-8
Content-Length: 4659
Cache-Control: no-cache, max-age=300
Set-Cookie: k=122.165.69.143.1288007695731989; path=/; expires=Mon,  
01-

Nov-10 11:54:55 GMT; domain=.twitter.com
Set-Cookie: guest_id=128800769629662265; path=/; expires=Wed, 24 Nov
2010 11:54:56 GMT
Set-Cookie:
_twitter_sess 
=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo

%250ASGFzaHsABjoKQHVzZWR7AA%253D
%253D--1164b91ac812d853b877e93ddb612b7471bebc74; domain=.twitter.com;
path=/
Expires: Mon, 25 Oct 2010 11:59:55 GMT
Vary: Accept-Encoding
Connection: close

--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] Empty responses

2010-10-25 Thread Taylor Singletary
Thanks for the report, we'll look into this.

Taylor

On Mon, Oct 25, 2010 at 8:04 AM, Tim  wrote:

> My cron jobs are picking up failures pulling specific users.
> The response body is empty, and the response status is 200
>
> examples:
> http://api.twitter.com/1/users/show/cinebot.json
> http://api.twitter.com/1/users/show/silenteye.json
>
> Perhaps these users are suspended, or something, but I'm not happy
> removing these users from my system unless I see a 403, or 404.
>
> --
> Twitter developer documentation and resources: http://dev.twitter.com/doc
> API updates via Twitter: http://twitter.com/twitterapi
> Issues/Enhancements Tracker:
> http://code.google.com/p/twitter-api/issues/list
> Change your membership to this group:
> http://groups.google.com/group/twitter-development-talk
>

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] Search by screen name or name?

2010-10-25 Thread Taylor Singletary
See GET users/search http://dev.twitter.com/doc/get/users/search

Taylor

On Mon, Oct 25, 2010 at 3:07 AM, Christian Fazzini <
christian.fazz...@gmail.com> wrote:

> What API method should I use to search for users based on screen name
> or name?
>
> Currently, the API only offers search by screen name and twitter id...
>
> --
> Twitter developer documentation and resources: http://dev.twitter.com/doc
> API updates via Twitter: http://twitter.com/twitterapi
> Issues/Enhancements Tracker:
> http://code.google.com/p/twitter-api/issues/list
> Change your membership to this group:
> http://groups.google.com/group/twitter-development-talk
>

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


Re: [twitter-dev] Create retweet link on external site

2010-10-25 Thread Taylor Singletary
This isn't possible at this time.

Taylor

On Sun, Oct 24, 2010 at 8:22 PM, Travis Estell  wrote:

> Hi everyone,
>
> This isn't really API-related, but I hope someone can help with this.
> I want to generate a link that will take a user to twitter and allow
> them to retweet a specific tweet.  Of course I could just use a link
> in the format: http://twitter.com/?status=RT..., but I want to
> generate a true, new-style retweet.  Is this possible?
>
>
> Thanks in advance,
> Travis
>
> --
> 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] Empty responses

2010-10-25 Thread Tim
My cron jobs are picking up failures pulling specific users.
The response body is empty, and the response status is 200

examples:
http://api.twitter.com/1/users/show/cinebot.json
http://api.twitter.com/1/users/show/silenteye.json

Perhaps these users are suspended, or something, but I'm not happy
removing these users from my system unless I see a 403, or 404.

-- 
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] "Invalid / expired Token" error message when trying to update status

2010-10-25 Thread Taylor Singletary
If you create an alternate application with the same account, issue access
tokens for that account, and perform the same test -- does everything work
fine? We've seen some cases where an API key becomes "poison" but have not
yet been able to determine the cause or a solution. Are there any other
environmental differences?

Taylor

On Sat, Oct 23, 2010 at 3:23 PM, angelsk  wrote:

> I'm using the OAuth token and secret provided in my application
> settings for "My OAuth Token" - this is a personal twitter posting
> cron job.
>
> I have exactly the same code in another implementation posting to
> another twitter account which is working fine.
>
> However, when I try and update the status of my main account
> 'angelsk', I get "Invalid / expired Token".
>
> Any help would be great.
>
> I've tried:
>
> * Re-copying and pasting the access token / secret and consumer key /
> secret
> * De-authorising the application on my Connections page and revisiting
> the application page to get a new token
>
> Still no luck.
>
> J
>
> --
> Twitter developer documentation and resources: http://dev.twitter.com/doc
> API updates via Twitter: http://twitter.com/twitterapi
> Issues/Enhancements Tracker:
> http://code.google.com/p/twitter-api/issues/list
> Change your membership to this group:
> http://groups.google.com/group/twitter-development-talk
>

-- 
Twitter 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] Cann't create application b/c settings/connection tab is missing

2010-10-25 Thread Taylor Singletary
Hi,

The best place to create applications and view your app settings is on
http://dev.twitter.com/apps -- just use your regular Twitter account.

Taylor

On Sat, Oct 23, 2010 at 2:34 AM, K  wrote:

> Hey guys,
> I just created a new Twitter account, and I want to create application
> so that I can send tweets using the 3rd-party app I created. However,
> setting/connections tab is missing, thus I cannot go to developer page
> to create my app. What am I doing wrong?
> Thanks!!
> Kate
>
> --
> 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] Twitter Tweet button count not updating (even on Twitter own page)

2010-10-25 Thread conde
We have been having this problem ever since we moved to the new
Twitter button. When we tweet, the count does not update rather just
stay at zero (for new content).

It doesn't even work on Twitter's own status page. Take a look at
Twitter status page. Try to tweet something there.
http://status.twitter.com/

The count updates only temporarily. But when you refresh the page it
goes back to the old count. I have been wondering if this count is
cached. I am not seeing the updated count since I tweeted last Friday
(3 days ago). Is this functionality bust? Is Twitter people looking
into this issue?

-- 
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] friends/ids and followers/ids not working in oauth

2010-10-25 Thread Taylor Singletary
The console on dev.twitter.com is unreliable. I recommend using Apigee's
great Twitter console instead http://app.apigee.com/console/twitter

http://app.apigee.com/console/twitter#apimet=http%3A//api.twitter.com/1/friends/ids.json%3Fuser_id%3D1497__apiidx__%3Dnull__apisecure__%3Dtrue__apiprovider__%3Dtwitterfor
a good example.

We're working on showing our current bug-ridden console who's boss.

Taylor

On Mon, Oct 25, 2010 at 1:28 AM, jlezard  wrote:

> Hello,
>
> If you use the console to call the method friends/ids (like
> http://api.twitter.com/1/friends/ids.json?user_id=12345
> ) it no longer returns a nicely formated json, in fact it returns
> something completly wrong like 4 ids for someone who has 250
> friends
>
> I was heavily relying on this method for my app,  is there going to be
> a fix to this ?
>
>
> Thanks a lot
>
>
>
> Note: I can still get the friend ids with basic auth but then the
> limit is 150 which is not sufficient.
>
> --
> 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] Status Update - Error - 500 Internal Server Error

2010-10-25 Thread Anandhev
Hi,

I get the error while sending "Status Update" request. Details are
shown below.

Sometimes, I get proper responses when i exclude "Authorization
signature ". But most of the time, I get the following error.

My request and response is attached. Kindly help us to fix this issue.

Thanks,

--Request 
POST /1/statuses/update.xml?status=success HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Authorization: OAuth realm="Twitter
API",oauth_version="1.0",oauth_nonce="981E91F",oauth_timestamp="1288007529",oauth_signature_method="HMAC-
SHA1",oauth_consumer_key="7vMm4YKEgAWhLCkkvpjchA",oauth_consumer_secret="BX4LciPyn0czUKvQXQWhy7YUyzGqywqFO9UclJ5mX0",oauth_token="146432631-
AsYHO57Hyrh1m94f6DQhUkWsR8LMtTHlznHCWJ7C",oauth_token_secret="ZJpq4ZtIb9iODytUHGUHBwC5pnVQXhkEcIX8b58I1A",oauth_signature="FyoCCQwsu5XZHR09Dx6fV2Oh
+uw="
Host: api.twitter.com
Content-Length: 0
Connection: Keep-Alive


--Response
HTTP/1.1 500 Internal Server Error
Date: Mon, 25 Oct 2010 11:54:56 GMT
Server: hi
Status: 500 Internal Server Error
Content-Type: text/html; charset=utf-8
Content-Length: 4659
Cache-Control: no-cache, max-age=300
Set-Cookie: k=122.165.69.143.1288007695731989; path=/; expires=Mon, 01-
Nov-10 11:54:55 GMT; domain=.twitter.com
Set-Cookie: guest_id=128800769629662265; path=/; expires=Wed, 24 Nov
2010 11:54:56 GMT
Set-Cookie:
_twitter_sess=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo
%250ASGFzaHsABjoKQHVzZWR7AA%253D
%253D--1164b91ac812d853b877e93ddb612b7471bebc74; domain=.twitter.com;
path=/
Expires: Mon, 25 Oct 2010 11:59:55 GMT
Vary: Accept-Encoding
Connection: close

-- 
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] friends/ids and followers/ids not working in oauth

2010-10-25 Thread jlezard
Hello,

If you use the console to call the method friends/ids (like
http://api.twitter.com/1/friends/ids.json?user_id=12345
) it no longer returns a nicely formated json, in fact it returns
something completly wrong like 4 ids for someone who has 250
friends

I was heavily relying on this method for my app,  is there going to be
a fix to this ?


Thanks a lot



Note: I can still get the friend ids with basic auth but then the
limit is 150 which is not sufficient.

-- 
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] don't work twitter api

2010-10-25 Thread Иван Каптюк
Почему Twitter не дает oauth_token, когда я пытаюсь его получит
отсылая свой key и secret. Выдает "This page is no longer valid. It
looks like someone already used the token information you provided.
Please return to the site that sent you to this page and try again ...
it was probably an honest mistake." С тем же кодом делаю запрос на
rutvit, соединение авторизуется. help..

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


[twitter-dev] Create retweet link on external site

2010-10-25 Thread Travis Estell
Hi everyone,

This isn't really API-related, but I hope someone can help with this.
I want to generate a link that will take a user to twitter and allow
them to retweet a specific tweet.  Of course I could just use a link
in the format: http://twitter.com/?status=RT..., but I want to
generate a true, new-style retweet.  Is this possible?


Thanks in advance,
Travis

-- 
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 let my app always send tweets to my account?

2010-10-25 Thread Thom DeCarlo
I have a problem doing something that I thought would be pretty easy.
I have created a Twitter account for my business. I have a java web
application running on my server. I want the java app send tweets
using the business' ID when certain events occur on the system.

I am using Twitter4J v2.1.7 SNAPSHOT to handle the OAuth and message
passing.

I have been able to force tweets out of the system using code built of
of their OAuth example. However, it requires manual interaction (going
to the Authorize URL, click "Approve", copy PIN, paste into console.)
It really seems like I am missing something here. I thought there
would be an easy way for the app to send messages using a specific
Twitter account. (There is only one Twitter ID that will EVER be used
to send messages from the app.)

Can anyone tell me how this is supposed to work?

Thanks,
Thom
@DarkExpanse
www.DarkExpanse.net

-- 
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] "Hello, World!" example in Java?

2010-10-25 Thread Thom DeCarlo
I've been pouring through the available documentation, trying to
figure out how to get started with the Twitter API for my Java web
app. I really only need a simple variant of a basic "Hello, World!"
app, but I cannot find anything that helps me. The closest I found was
James Hogan's One Way Tweet example. (http://threadbarecanvas.com/java/
one-way-tweet-a-java-app/) However, this is more than a year old and
uses Basic Authentication. I think I will need to use OAuth.

Can anyone point me at a simple example of sending tweets to a single
account using OAuth in Java?

TIA!
Thom

-- 
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] Incorrect signature

2010-10-25 Thread yogeshkolte
Hi In my android app I can make calls to Twitter api immediately after
I login. I am using same instance of OAuthConsumer. But when I create
OAuthconsumer for subsequent call and use setTokenWithSecret I get
Incorrect signature error.

I spent few hours trying to debug but no luck... any help is
appreciated.

Following is code ...in onnewIntent if statement 1== 1 works but I get
Incorrect signature error If I call verify method on Twitter adapter

private static String TAG = "OAuthForTwitter";

private CommonsHttpOAuthConsumer httpOauthConsumer;
private OAuthProvider httpOauthprovider;
public final static String consumerKey = "";
public final static String consumerSecret = "";
private final String CALLBACKURL = "myapp://mainactivity";


@Override
protected void onNewIntent(Intent intent) {

super.onNewIntent(intent);
Log.d(TAG, "onNewIntent");

Uri uri = intent.getData();

if (uri != null && uri.toString().startsWith(CALLBACKURL)) {

String verifier = uri
.getQueryParameter(oauth.signpost.OAuth.OAUTH_VERIFIER);

Log.d(TAG, "onNewIntent  " + " verifier " + verifier);
try {

httpOauthprovider.retrieveAccessToken(httpOauthConsumer,
verifier);
String userKey = httpOauthConsumer.getToken();
String userSecret = httpOauthConsumer.getConsumerSecret();

if (1 == 1) {
String surl = "http://api.twitter.com/1/account/
verify_credentials.xml";

HttpGet request = null;
HttpClient httpClient = null;
HttpResponse response = null;
request = new HttpGet(surl);
httpOauthConsumer.sign(request);
System.out.println("Sending request to Twitter...");
httpClient = new DefaultHttpClient();

response = httpClient.execute(request);
String sresponse = parseResponseToString(response);
Log.d(TAG, sresponse);
} else {

TwitterAdapter adapter = new TwitterAdapter(null,
consumerKey, consumerSecret, userKey,
userSecret);
String s = adapter.VerifyUser();
Log.d(TAG, s);
}

} catch (Exception e) {
Log.d(TAG, "onNewIntent error " + e.getMessage());
}

}
}


@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
doOauth();
}

private void doOauth() {
try {
httpOauthConsumer = new CommonsHttpOAuthConsumer(consumerKey,
consumerSecret);
httpOauthprovider = new DefaultOAuthProvider(
"http://twitter.com/oauth/request_token";,
"http://twitter.com/oauth/access_token";,
"http://twitter.com/oauth/authorize";);

String authUrl = httpOauthprovider.retrieveRequestToken(
httpOauthConsumer, CALLBACKURL);

this.startActivity(new Intent(Intent.ACTION_VIEW, Uri
.parse(authUrl)));
Log.d(TAG, "sent doOauth");
} catch (Exception e) {
Toast.makeText(this, e.getMessage(),
Toast.LENGTH_LONG).show();
}
Log.d(TAG, " doOauth Complete");
}


public class TwitterAdapter {

oauth.signpost.commonshttp.CommonsHttpOAuthConsumer
httpOauthConsumer;

public TwitterAdapter(String username, String consumerkey,String
consumersecret, String accesstoken, String accesssecret) {

httpOauthConsumer = new CommonsHttpOAuthConsumer(consumerkey,
consumersecret);

httpOauthConsumer.setTokenWithSecret(accesstoken,
consumersecret);
}


public String VerifyUser() throws ClientProtocolException,
IOException,
OAuthMessageSignerException,
OAuthExpectationFailedException,
OAuthCommunicationException {

String surl = "http://api.twitter.com/1/account/
verify_credentials.xml";

HttpGet request = null;
HttpClient httpClient = null;
HttpResponse response = null;
request = new HttpGet(surl);
httpOauthConsumer.sign(request);
System.out.println("Sending request to Twitter...");
httpClient = new DefaultHttpClient();

response = httpClient.execute(request);
return parseResponseToString(response);

}
}

-- 
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] Certificate Twitter Apps

2010-10-25 Thread loretoparisi
Hi,
I'm cto for stickphone.me and lyricsmood.me, oauth based twitter apps.

Many users told us that they just don't use our oauth sign in service,
since it seems to them to be unsafe with this kind of sign in (single
sign-on from oauth client site)

This is not a design problem I guess, but a people misunderstanding
problem, about the authorization protocol (going away from people like
developers, engineers, etc, who really knows what oAuth is about?),
even if we tried to explain this process as well in our sites tos.

I was wondering if you @twitter have any idea in the future to
certificate an app in order this app to be "verified" by twitter (in
the same way some accounts are).

In this ways app users would not be scared when clickin on "Sign in to
Twitter" buttons.

Of course using Twitter's button styles would be a better experience
for the user in order to trust the thirdy-party service, but this is
not possibile in all cases.

Thanks,
Loreto Parisi
CTO at stickphone, lyricsmood
lor...@stickphone.me
lor...@lyricsmood.me

-- 
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] "Invalid / expired Token" error message when trying to update status

2010-10-25 Thread angelsk
I'm using the OAuth token and secret provided in my application
settings for "My OAuth Token" - this is a personal twitter posting
cron job.

I have exactly the same code in another implementation posting to
another twitter account which is working fine.

However, when I try and update the status of my main account
'angelsk', I get "Invalid / expired Token".

Any help would be great.

I've tried:

* Re-copying and pasting the access token / secret and consumer key /
secret
* De-authorising the application on my Connections page and revisiting
the application page to get a new token

Still no luck.

J

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


[twitter-dev] Android OAUTH Incorrect Signature error

2010-10-25 Thread yogeshkolte
Well following code works when I make api call immediately after
authorization onNewIntent event but when I put same code in Adapter
class  I get incorrect signature error.  I am using CallbackURL. Do we
always need to create consume object using verifier or
setTokenWithSecret  should work on subsequent calls.  Any help is
appreciated

Thanks


if (1 == 1) // WORKS
{
String surl = 
"http://api.twitter.com/1/account/
verify_credentials.xml";

HttpGet request = null;
HttpClient httpClient = null;
HttpResponse response = null;
request = new HttpGet(surl);
httpOauthConsumer.sign(request);
System.out.println("Sending request to 
Twitter...");
httpClient = new DefaultHttpClient();

response = httpClient.execute(request);
String sresponse = 
parseResponseToString(response);
Log.d(TAG, sresponse);
} else {
 //  GET INCORRECT SIGNATURE
ERROR

TwitterAdapter adapter = new 
TwitterAdapter(null,
consumerKey, 
consumerSecret, userKey, userSecret);
String s = adapter.VerifyUser();
Log.d(TAG, s);
}

Here is full code

package com.sogeti.msl;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;

import oauth.signpost.OAuthProvider;
import oauth.signpost.basic.DefaultOAuthProvider;
import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer;
import oauth.signpost.exception.OAuthCommunicationException;
import oauth.signpost.exception.OAuthExpectationFailedException;
import oauth.signpost.exception.OAuthMessageSignerException;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;

public class OAuthForTwitter extends Activity {
private static String TAG = "OAuthForTwitter";

private CommonsHttpOAuthConsumer httpOauthConsumer;
private OAuthProvider httpOauthprovider;
public final static String consumerKey = "";
public final static String consumerSecret = "";
private final String CALLBACKURL = "myapp://mainactivity";

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
doOauth();
}

private void doOauth() {
try {
httpOauthConsumer = new
CommonsHttpOAuthConsumer(consumerKey,consumerSecret);
httpOauthprovider = new 
DefaultOAuthProvider("http://twitter.com/
oauth/request_token",
"http://twitter.com/oauth/access_token";,
"http://twitter.com/oauth/authorize";);

String authUrl = httpOauthprovider.retrieveRequestToken(
httpOauthConsumer, CALLBACKURL);

this.startActivity(new Intent(Intent.ACTION_VIEW, Uri
.parse(authUrl)));
Log.d(TAG, "sent doOauth");
} catch (Exception e) {
Toast.makeText(this, e.getMessage(), 
Toast.LENGTH_LONG).show();
}
Log.d(TAG, " doOauth Complete");
}

@SuppressWarnings("unused")
@Override
protected void onNewIntent(Intent intent) {

super.onNewIntent(intent);
Log.d(TAG, "onNewIntent");

Uri uri = intent.getData();

if (uri != null && uri.toString().startsWith(CALLBACKURL)) {

String verifier =
uri.getQueryParameter(oauth.signpost.OAuth.OAUTH_VERIFIER);

Log.d(TAG, "onNewIntent  " + " verifier " + verifier);
try {


httpOauthprovider.retrieveAccessToken(httpOauthConsumer,verifier);
String userKey = httpOauth

[twitter-dev] Re: Help for twitteroauth

2010-10-25 Thread Vishnu S
Hi Abraham.. im using your twitterauth. Ive got everything set right,
but im also getting the error as mentioned about. One thing i noticed
is that the url is:
https://twitter.com/oauth/authorize?oauth_token=

i dont find the token. What might have gone wrong?

Regards
vishnu

On Sep 20, 8:11 am, Abraham Williams <4bra...@gmail.com> wrote:
>  "Could not connect to Twitter. Refresh the page or try again later." with
> TwitterOAuth generally means one of several things. You don't have a valid
> consumer key/secret being used, there is a firewall blocking access from
> your server tohttps://api.twitter.com, or your servers time is not being
> automatically synced.
>
> Abraham
> -
> Abraham Williams | Hacker Advocate |http://abrah.am
> @abraham |http://projects.abrah.am|http://blog.abrah.am
> This email is: [ ] shareable [x] ask first [ ] private.
>
>
>
> On Wed, Sep 15, 2010 at 01:42, kilotto  wrote:
> > Hi all,
>
> > I'm trying use twitteroauth but I have some problems.
>
> > When I use twitter twitteroauth in my webserver (
> >http://twitter.domain.net
> > )  the script display the error: "Could not connect to Twitter.
> > Refresh the page or try again later.".
>
> > If I use other script, it display: "Woah there! This page is no longer
> > valid. It looks like someone already used the token information you
> > provided. Please return to the site that sent you to this page and try
> > again ... it was probably an honest mistake."
>
> > I've tried twitteroauth in local and it works fine.
>
> > How I can fix this ?
>
> > Tnx!
>
> > --
> > 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?hl=en

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


[twitter-dev] Re: Snowflake: An update and some very important information

2010-10-25 Thread Tim
What about methods that list IDs without keys? e.g. blocks/ids which
produces a array like [ 12345, 6789,  ]
These appear to be still cast as integers.

I don't see the point in having integer IDs at all. Surely the case of
people wishing to handle them as integers is far smaller than the case
of people who simply need a unique reference. It is much easier for
the minority to cast string IDs to integers than it is for the rest of
us to do the reverse.

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


[twitter-dev] Re: Snowflake: An update and some very important information

2010-10-25 Thread Johannes la Poutre
@Themattharris: was there any change to the implementation timeline?
Quote: "by 22nd October 2010 (Friday): String versions of ID numbers
will start appearing in the API responses"

I'm still not seeing id_str, to_user_id_str  and from_user_id_str etc.
in the current search API output, example:

http://search.twitter.com/search.json?geocode=52.155018%2C4.487658%2C1km

is there an updated timeline or did I miss something?

Best,

-- Johannes / @jlapoutre / @tweepsaround


On Oct 19, 2:19 am, Matt Harris  wrote:
> Last week you may remember Twitter planned to enable the new Status ID
> generator - 'Snowflake' but didn't. The purpose of this email is to explain
> the reason why this didn't happen, what we are doing about it, and what the
> new release plan is.
>
> So what is Snowflake?
> --
> Snowflake is a service we will be using to generate unique Tweet IDs. These
> Tweet IDs are unique 64bit unsigned integers, which, instead of being
> sequential like the current IDs, are based on time. The full ID is composed
> of a timestamp, a worker number, and a sequence number.
>
> The problem
> -
> Before launch it came to our attention that some programming languages such
> as Javascript cannot support numbers with >53bits. This can be easily
> examined by running a command similar to: (90071992547409921).toString() in
> your browsers console or by running the following JSON snippet through your
> JSON parser.
>
>     {"id": 10765432100123456789, "id_str": "10765432100123456789"}
>
> In affected JSON parsers the ID will not be converted successfully and will
> lose accuracy. In some parsers there may even be an exception.
>
> The solution
> 
> To allow javascript and JSON parsers to read the IDs we need to include a
> string version of any ID when responding in the JSON format. What this means
> is Status, User, Direct Message and Saved Search IDs in the Twitter API will
> now be returned as an integer and a string in JSON responses. This will
> apply to the main Twitter API, the Streaming API and the Search API.
>
> For example, a status object will now contain an id and an id_str. The
> following JSON representation of a status object shows the two versions of
> the ID fields for each data point.
>
> [
>   {
>     "coordinates": null,
>     "truncated": false,
>     "created_at": "Thu Oct 14 22:20:15 + 2010",
>     "favorited": false,
>     "entities": {
>       "urls": [
>       ],
>       "hashtags": [
>       ],
>       "user_mentions": [
>         {
>           "name": "Matt Harris",
>           "id": 777925,
>           "id_str": "777925",
>           "indices": [
>             0,
>             14
>           ],
>           "screen_name": "themattharris"
>         }
>       ]
>     },
>     "text": "@themattharris hey how are things?",
>     "annotations": null,
>     "contributors": [
>       {
>         "id": 819797,
>         "id_str": "819797",
>         "screen_name": "episod"
>       }
>     ],
>     "id": 12738165059,
>     "id_str": "12738165059",
>     "retweet_count": 0,
>     "geo": null,
>     "retweeted": false,
>     "in_reply_to_user_id": 777925,
>     "in_reply_to_user_id_str": "777925",
>     "in_reply_to_screen_name": "themattharris",
>     "user": {
>       "id": 6253282
>       "id_str": "6253282"
>     },
>     "source": "web",
>     "place": null,
>     "in_reply_to_status_id": 12738040524
>     "in_reply_to_status_id_str": "12738040524"
>   }
> ]
>
> What should you do - RIGHT NOW
> --
> The first thing you should do is attempt to decode the JSON snippet above
> using your production code parser. Observe the output to confirm the ID has
> not lost accuracy.
>
> What you do next depends on what happens:
>
> * If your code converts the ID successfully without losing accuracy you are
> OK but should consider converting to the _str versions of IDs as soon as
> possible.
> * If your code has lost accuracy, convert your code to using the _str
> version immediately. If you do not do this your code will be unable to
> interact with the Twitter API reliably.
> * In some language parsers, the JSON may throw an exception when reading the
> ID value. If this happens in your parser you will need to ‘pre-parse’ the
> data, removing or replacing ID parameters with their _str versions.
>
> Summary
> -
> 1) If you develop in Javascript, know that you will have to update your code
> to read the string version instead of the integer version.
>
> 2) If you use a JSON decoder, validate that the example JSON, above, decodes
> without throwing exceptions. If exceptions are thrown, you will need to
> pre-parse the data. Please let us know the name, version, and language of
> the parser which throws the exception so we can investigate.
>
> Timeline
> ---
> by 22nd October 2010 (Friday): String versions of ID numbers will start
> appearing in the API responses
> 4th November 2010 (Thu

[twitter-dev] Search by screen name or name?

2010-10-25 Thread Christian Fazzini
What API method should I use to search for users based on screen name
or name?

Currently, the API only offers search by screen name and twitter id...

-- 
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