[twitter-dev] Re: wait time for Site Streams whitelist ?
Well it's taken 7 weeks, but I finally got an email basically saying we weren't accepted onto the beta program. Fair enough - it is a beta, least we can make other plans now. dw. On Apr 19, 12:39 am, Mamadou Bobo Diallo dia...@gurumades.com wrote: We are all waiting for Site Stream whitelisting. The issues here is that you are stuck not knowing either you should invest more time in building a product you never tested. Unfortunatly, site stream is the only API on which our product make sense building on. So let have finger crossed and hope we'll get one day an email from twitter. On 18 avr, 08:10, David W d_wy...@yahoo.com wrote: I'm intrigued - has anyone else been given Site Streams access in the last month? We signed the Terms of Service over a month ago and have heard nothing since, despite asking here, via email and via @SiteStreams I'm interested to know whether all applications have been frozen or whether it's just ours for unknown reasons. Thanks, dw. -- 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
Hi all. I'm new to OAuth and have a basic question. Does using OAuth require the user to login via a web page or view to the twitter site in order to authenticate my application? Or can I do this on their behalf without needing to render web content? Perhaps this isn't my issue, but I just started with MGTwitterEngine and am getting 401's. Thanks!! -- 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: error 401 failed oauth_signature and token / javascript - qml
Hi, Thanks for answering my question. I've tried a lot of things to reach oauth/request_token, and i've tried : request_maker.open(POST, https://api.twitter.com/oauth/ request_token) but nothing has changed ! here is my new code : function signForm() { accessor = { consumerSecret: consumer_secret , tokenSecret : oauth_token_secret}; message = { action: https://api.twitter.com/oauth/request_token; , method: POST , parameters: [] }; message.parameters.push([oauth_consumer_key=, consumer_key]); message.parameters.push([oauth_callback=, oauth_callback]); message.parameters.push([oauth_signature_method=, signature_method]); OAuth.setTimestampAndNonce(message); message.parameters.push([oauth_version=, oauth_version]); OAuth.SignatureMethod.sign(message, accessor); return true; } function getSignature() { signForm(); console.log(OAuth.SignatureMethod.getBaseString(message)); console.log(OAuth.getParameter(message.parameters, oauth_signature)); request_maker = new XMLHttpRequest(); request_maker.open(POST, https://api.twitter.com/oauth/ request_token); request_maker.setRequestHeader(Host, api.twitter.com); request_maker.setRequestHeader(Content-type, application/x-www- form-urlencoded); request_maker.setRequestHeader(Authorization, OAuth +oauth_signature_method=+signature_method +oauth_timestamp=+OAuth.getParameter(message.parameters, oauth_timestamp) +oauth_nonce=+OAuth.getParameter(message.parameters, oauth_nonce) +oauth_signature=+OAuth.getParameter(message.parameters, oauth_signature)); request_maker.onreadystatechange = oth_func; request_maker.send(oauth_signature_method=+signature_method +oauth_timestamp=+OAuth.getParameter(message.parameters, oauth_timestamp) +oauth_nonce=+OAuth.getParameter(message.parameters, oauth_nonce) +oauth_signature=+escape(OAuth.getParameter(message.parameters, oauth_signature))); } At first i thought it was my signature but i've checked again and it appears to be ok. maybe it's about base64 thing. I've also seen that when i checked request_token with that tool : http://oauth.googlecode.com/svn/code/javascript/example/requestToken.html Request_token succees on https but fails on http. On 18 avr, 21:14, Matt Harris thematthar...@twitter.com wrote: Hi, Looking at your code this line: request_maker.open(POST, https://api.twitter.com/oauth;); makes it look like you are making a request to: https://api.twitter.com/oauth Double check you are sending the user to the correct endpoint. At this point of your flow I think you mean to make a request tohttps://api.twitter.com/oauth/request_token. Best @themattharris Developer Advocate, Twitterhttp://twitter.com/themattharris On Fri, Apr 15, 2011 at 4:51 AM, galeyte gaetan...@gmail.com wrote: I don't have a 401 anymore but i recieve a you are being redirected page, so i can't get my request_token here is my code : function getSignature() { var accessor = { consumerSecret: consumer_secret, tokenSecret: oauth_token_secret }; var message = { method: POST, action: /request_token, parameters: [] }; message.parameters.push([oauth_callback, OAuth.formEncode(oauth_callback)]); message.parameters.push([oauth_consumer_key, OAuth.formEncode(consumer_key)]); message.parameters.push([oauth_nonce, OAuth.nonce(32)]); message.parameters.push([oauth_signature_method, signature_method]); message.parameters.push([oauth_timestamp, OAuth.timestamp()]); OAuth.completeRequest(message, accessor); OAuth.SignatureMethod.sign(message, accessor); console.log(OAuth.getParameter(message.parameters, oauth_signature)); var data = Oauth oauth_consumer_key=+consumer_key +oauth_signature_method=+signature_method +oauth_callback=+OAuth.getParameter(message.parameters, oauth_callback) +oauth_timestamp=+OAuth.getParameter(message.parameters, oauth_timestamp) +oauth_nonce=+OAuth.getParameter(message.parameters, oauth_nonce) +oauth_signature=+OAuth.getParameter(message.parameters, oauth_signature); console.log(data); request_maker = new XMLHttpRequest(); request_maker.open(POST, https://api.twitter.com/oauth;); request_maker.setRequestHeader(Authorization, data); request_maker.onreadystatechange = oth_func; request_maker.send(Authorization OAuth + data); } I don't now if it's me being dumb or anything else, but i really can't find my mistake. -- 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:
[twitter-dev] Re: How to get the number of pages in user's timeline
I'm pretty sure all tweet IDs are in a single global ordering, so 1 week ago is the same numerical ID (for the since_id) param for every user account. So you could post a single tweet (or similar) every day and use this to build a date to ID mapping over time... then you'll know an ID to use to indicate 1 week ago for any given date past when you started (and it's pretty simple to build a historical table) - then you can experiment with using the user/timeline API with since_id (and max_id too if needed) Don't know for sure it would work, but from what you've explained so far, that's the sort of thing I'd experiment with first... -- T -- 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: Logout : Twitter Iphone MGTwitterEngine
Hi Now I am using this code [twitterObj endUserSession]; [twitterObj clearAccessToken]; Now its working fine but giving error HTTP 401 as request failure On Apr 12, 5:03 pm, Rinku Sadhwani\Love is like war: Easy to begin but hard to end.\ - Anonymous\ rinku.sadhw...@gmail.com wrote: On Tue, Apr 12, 2011 at 5:26 PM, Battan Ror batta...@gmail.com wrote: Hi All How we logout the user from iphone twitter applicatio I am using MGTwitterEngine with code [twitterObj endUserSession]; But user is not logout How we do that u can do like that -(void)logout { [_engine clearAccessToken]; NSlog(@logout press); } rinku -- 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: error 401 failed oauth_signature and token / javascript - qml
Ok so i've stopped using OAuth javascript library Here is my new code : function getSignature() { var nonce = OAuth.nonce(31); var time = OAuth.timestamp(); var parameters = [encodeURIComponent(oauth_token=+oauth_token), encodeURIComponent(oauth_consumer_key=+consumer_key), encodeURIComponent(oauth_nonce=+nonce), encodeURIComponent(oauth_signature_method=HMAC- SHA1),encodeURIComponent(oauth_timestamp=+time), encodeURIComponent(oauth_version=1.0)]; parameters = parameters.sort(); var join = parameters.join(); var joindparameters = encodeURIComponent(join); var baseString = POST+encodeURIComponent(request_token_url)+ + joindparameters; console.log(baseString = + baseString); var signature = b64_hmac_sha1(consumer_secret + +oauth_token_secret, baseString); console.log(signature); request_maker = new XMLHttpRequest(); request_maker.open(POST, request_token_url); var data = OAuth realm='', oauth_nonce=+nonce+, oauth_timestamp=+time+, oauth_consumer_key=+consumer_key+, oauth_signature_method=HMAC-SHA1, oauth_version=1.0, oauth_signature=+signature; console.log(data); request_maker.setRequestHeader(Authorization, data); request_maker.onreadystatechange = oth_func; request_maker.send(); } and here is the BaseString it generates : POSThttps%3A%2F%2Fapi.twitter.com%2Foauth %2Frequest_tokenoauth_consumer_key%253D[OAUTH_CONSUMER_KEY] %26oauth_nonce%253D9HQfzLWlhqFpZAaURHNHr5bkpvMlweg %26oauth_signature_method%253DHMAC-SHA1%26oauth_timestamp %253D1303216955%26oauth_token%253DOAUTH_TOKEN%26oauth_version%253D1.0 and here is the signature : N2K3D1ZjAd7h8urLAjeyUSTWFUU= I've tried generate the signature with composite signing key : consumer_secret + + token_secret and without the token_secret On 19 avr, 11:08, galeyte gaetan...@gmail.com wrote: Hi, Thanks for answering my question. I've tried a lot of things to reach oauth/request_token, and i've tried : request_maker.open(POST, https://api.twitter.com/oauth/ request_token) but nothing has changed ! here is my new code : function signForm() { accessor = { consumerSecret: consumer_secret , tokenSecret : oauth_token_secret}; message = { action: https://api.twitter.com/oauth/request_token; , method: POST , parameters: [] }; message.parameters.push([oauth_consumer_key=, consumer_key]); message.parameters.push([oauth_callback=, oauth_callback]); message.parameters.push([oauth_signature_method=, signature_method]); OAuth.setTimestampAndNonce(message); message.parameters.push([oauth_version=, oauth_version]); OAuth.SignatureMethod.sign(message, accessor); return true; } function getSignature() { signForm(); console.log(OAuth.SignatureMethod.getBaseString(message)); console.log(OAuth.getParameter(message.parameters, oauth_signature)); request_maker = new XMLHttpRequest(); request_maker.open(POST, https://api.twitter.com/oauth/ request_token); request_maker.setRequestHeader(Host, api.twitter.com); request_maker.setRequestHeader(Content-type, application/x-www- form-urlencoded); request_maker.setRequestHeader(Authorization, OAuth +oauth_signature_method=+signature_method +oauth_timestamp=+OAuth.getParameter(message.parameters, oauth_timestamp) +oauth_nonce=+OAuth.getParameter(message.parameters, oauth_nonce) +oauth_signature=+OAuth.getParameter(message.parameters, oauth_signature)); request_maker.onreadystatechange = oth_func; request_maker.send(oauth_signature_method=+signature_method +oauth_timestamp=+OAuth.getParameter(message.parameters, oauth_timestamp) +oauth_nonce=+OAuth.getParameter(message.parameters, oauth_nonce) +oauth_signature=+escape(OAuth.getParameter(message.parameters, oauth_signature))); } At first i thought it was my signature but i've checked again and it appears to be ok. maybe it's about base64 thing. I've also seen that when i checked request_token with that tool :http://oauth.googlecode.com/svn/code/javascript/example/requestToken Request_token succees on https but fails on http. On 18 avr, 21:14, Matt Harris thematthar...@twitter.com wrote: Hi, Looking at your code this line: request_maker.open(POST, https://api.twitter.com/oauth;); makes it look like you are making a request to: https://api.twitter.com/oauth Double check you are sending the user to the correct endpoint. At this point of your flow I think you mean to make a request tohttps://api.twitter.com/oauth/request_token. Best @themattharris Developer Advocate, Twitterhttp://twitter.com/themattharris On Fri, Apr 15, 2011 at 4:51 AM, galeyte gaetan...@gmail.com wrote: I don't have a 401 anymore but i recieve a you are being redirected page, so i can't get my request_token here is my code : function getSignature() { var accessor = { consumerSecret: consumer_secret, tokenSecret:
[twitter-dev] Re: 401 Unauthorized Responses to requests signed with whitelisted account
Hi Matt, Thank you so much for your timely response. Your suggestion was very helpful - I logged the response body and am seeing the following error: Invalid / suspended application I really don't know why that would be - does that mean that we are blacklisted? I should point out a few things that you will probably want to know: 1. We have a conservative and fairly sophisticated throttling system to prevent us from over-stepping the rate limit (I don't think that's the problem...) 2. On Saturday I received a message from the API support team confirming that our whitelisted account was in good standing (can provide the message if it's helpful) 3. We've seen the rate limit reported in the response change back and forth somewhat sporadically... Thank you again for any help you can provide - in general we are very pleased with the API and we certainly appreciate your support! Best, Chris On Apr 18, 3:44 pm, Matt Harris thematthar...@twitter.com wrote: Hi Christopher, Could you attempt to get the response body for the request either by repeating the request or enhancing your logs. The reason for the 401 is communicated in the response body and knowing that will help explain what is going on. Best, @themattharris Developer Advocate, Twitterhttp://twitter.com/themattharris On Mon, Apr 18, 2011 at 11:23 AM, Christopher Stolte stolte...@gmail.comwrote: Hello, I am a Java developer working on a web application that makes use of the Twitter API. We use the Signpost library (version 1.2.1.1) to perform OAuth and issue API requests, and have been doing so successfully for months. We have been signing our requests with a whitelisted key and secret that has a 20,000 request/hour rate limit. In the last few days, we started getting only 401 Not Authorized responses when using these credentials. Upon looking back at our server logs, I notice other requests failures dating back to at least Feb 17, but they are sporadic. Error messages look like this: WARN org.apache.http.impl.client.DefaultHttpClient Authentication error: Unable to respond to any of these challenges: {oauth=WWW- Authenticate: OAuth realm=http://api.twitter.com} The response header shows 401 but no other enlightening information. I have paid attention to and read lots of other postings related to OAuth, and want to emphasize that our system has been working for quite a while - we make calls using the proper end points and so forth: http://api.twitter.com/1/users/show.json?user_id=[id] Something appears to have changed on Twitter's end but we don't know what. Can anyone shed some light on what might be happening? We have already verified with Twitter API support that our credentials should still be viable - perhaps there has been an inadvertent shutdown of that account? Thank you in advance for any help or guidance! Sincerely, Chris Stolte -- 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: 401 Unauthorized Responses to requests signed with whitelisted account
Hi Matt, Thank you so much for your timely response. Your suggestion was very helpful - I logged the response body and am seeing the following error: Invalid / suspended application I really don't know why that would be - does that mean that we are blacklisted? I should point out a few things that you will probably want to know: 1. We have a conservative and fairly sophisticated throttling system to prevent us from over-stepping the rate limit (I don't think that's the problem...) 2. On Saturday I received a message from the API support team confirming that our whitelisted account was in good standing (can provide the message if it's helpful) 3. We've seen the rate limit reported in the response change back and forth somewhat sporadically... Thank you again for any help you can provide - in general we are very pleased with the API and we certainly appreciate your support! Best, Chris On Apr 18, 3:44 pm, Matt Harris thematthar...@twitter.com wrote: Hi Christopher, Could you attempt to get the response body for the request either by repeating the request or enhancing your logs. The reason for the 401 is communicated in the response body and knowing that will help explain what is going on. Best, @themattharris Developer Advocate, Twitterhttp://twitter.com/themattharris On Mon, Apr 18, 2011 at 11:23 AM, Christopher Stolte stolte...@gmail.comwrote: Hello, I am a Java developer working on a web application that makes use of the Twitter API. We use the Signpost library (version 1.2.1.1) to perform OAuth and issue API requests, and have been doing so successfully for months. We have been signing our requests with a whitelisted key and secret that has a 20,000 request/hour rate limit. In the last few days, we started getting only 401 Not Authorized responses when using these credentials. Upon looking back at our server logs, I notice other requests failures dating back to at least Feb 17, but they are sporadic. Error messages look like this: WARN org.apache.http.impl.client.DefaultHttpClient Authentication error: Unable to respond to any of these challenges: {oauth=WWW- Authenticate: OAuth realm=http://api.twitter.com} The response header shows 401 but no other enlightening information. I have paid attention to and read lots of other postings related to OAuth, and want to emphasize that our system has been working for quite a while - we make calls using the proper end points and so forth: http://api.twitter.com/1/users/show.json?user_id=[id] Something appears to have changed on Twitter's end but we don't know what. Can anyone shed some light on what might be happening? We have already verified with Twitter API support that our credentials should still be viable - perhaps there has been an inadvertent shutdown of that account? Thank you in advance for any help or guidance! Sincerely, Chris Stolte -- 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] don't work Japanese
hi I'm kunihiko from Japan I have a problem it is about twitter API ex. http://stream.twitter.com/1/statuses/filter.json?track=* * is English word OK but * is Japanese KANJI HIRAGANA KATAKANA don't work :( so what can I do for this problem... sory my english is poor @hoshi67 -- 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: error 401 failed oauth_signature and token / javascript - qml
And i stop using OAuth javascript library, and i'm getting the same basestring and signature as oauth library examples Here is the authorization header i send : OAuth realm='', oauth_nonce=1W3hagbtydTy8GBfkqxS3imJUDUfINi, oauth_timestamp=1303220837, oauth_consumer_key=[CONSUMER_KEY], oauth_signature_method=HMAC-SHA1, oauth_version=1.0, oauth_signature=ik0d0OV6JzLxQ/yeddowfSQCQgg= On 19 avr, 14:44, galeyte gaetan...@gmail.com wrote: Ok so i've stopped using OAuth javascript library Here is my new code : function getSignature() { var nonce = OAuth.nonce(31); var time = OAuth.timestamp(); var parameters = [encodeURIComponent(oauth_token=+oauth_token), encodeURIComponent(oauth_consumer_key=+consumer_key), encodeURIComponent(oauth_nonce=+nonce), encodeURIComponent(oauth_signature_method=HMAC- SHA1),encodeURIComponent(oauth_timestamp=+time), encodeURIComponent(oauth_version=1.0)]; parameters = parameters.sort(); var join = parameters.join(); var joindparameters = encodeURIComponent(join); var baseString = POST+encodeURIComponent(request_token_url)+ + joindparameters; console.log(baseString = + baseString); var signature = b64_hmac_sha1(consumer_secret + +oauth_token_secret, baseString); console.log(signature); request_maker = new XMLHttpRequest(); request_maker.open(POST, request_token_url); var data = OAuth realm='', oauth_nonce=+nonce+, oauth_timestamp=+time+, oauth_consumer_key=+consumer_key+, oauth_signature_method=HMAC-SHA1, oauth_version=1.0, oauth_signature=+signature; console.log(data); request_maker.setRequestHeader(Authorization, data); request_maker.onreadystatechange = oth_func; request_maker.send(); } and here is the BaseString it generates : POSThttps%3A%2F%2Fapi.twitter.com%2Foauth %2Frequest_tokenoauth_consumer_key%253D[OAUTH_CONSUMER_KEY] %26oauth_nonce%253D9HQfzLWlhqFpZAaURHNHr5bkpvMlweg %26oauth_signature_method%253DHMAC-SHA1%26oauth_timestamp %253D1303216955%26oauth_token%253DOAUTH_TOKEN%26oauth_version%253D1.0 and here is the signature : N2K3D1ZjAd7h8urLAjeyUSTWFUU= I've tried generate the signature with composite signing key : consumer_secret + + token_secret and without the token_secret On 19 avr, 11:08, galeyte gaetan...@gmail.com wrote: Hi, Thanks for answering my question. I've tried a lot of things to reach oauth/request_token, and i've tried : request_maker.open(POST, https://api.twitter.com/oauth/ request_token) but nothing has changed ! here is my new code : function signForm() { accessor = { consumerSecret: consumer_secret , tokenSecret : oauth_token_secret}; message = { action: https://api.twitter.com/oauth/request_token; , method: POST , parameters: [] }; message.parameters.push([oauth_consumer_key=, consumer_key]); message.parameters.push([oauth_callback=, oauth_callback]); message.parameters.push([oauth_signature_method=, signature_method]); OAuth.setTimestampAndNonce(message); message.parameters.push([oauth_version=, oauth_version]); OAuth.SignatureMethod.sign(message, accessor); return true; } function getSignature() { signForm(); console.log(OAuth.SignatureMethod.getBaseString(message)); console.log(OAuth.getParameter(message.parameters, oauth_signature)); request_maker = new XMLHttpRequest(); request_maker.open(POST, https://api.twitter.com/oauth/ request_token); request_maker.setRequestHeader(Host, api.twitter.com); request_maker.setRequestHeader(Content-type, application/x-www- form-urlencoded); request_maker.setRequestHeader(Authorization, OAuth +oauth_signature_method=+signature_method +oauth_timestamp=+OAuth.getParameter(message.parameters, oauth_timestamp) +oauth_nonce=+OAuth.getParameter(message.parameters, oauth_nonce) +oauth_signature=+OAuth.getParameter(message.parameters, oauth_signature)); request_maker.onreadystatechange = oth_func; request_maker.send(oauth_signature_method=+signature_method +oauth_timestamp=+OAuth.getParameter(message.parameters, oauth_timestamp) +oauth_nonce=+OAuth.getParameter(message.parameters, oauth_nonce) +oauth_signature=+escape(OAuth.getParameter(message.parameters, oauth_signature))); } At first i thought it was my signature but i've checked again and it appears to be ok. maybe it's about base64 thing. I've also seen that when i checked request_token with that tool :http://oauth.googlecode.com/svn/code/javascript/example/requestToken Request_token succees on https but fails on http. On 18 avr, 21:14, Matt Harris thematthar...@twitter.com wrote: Hi, Looking at your code this line: request_maker.open(POST, https://api.twitter.com/oauth;); makes it look like you are making a request to: https://api.twitter.com/oauth Double check you are sending the
[twitter-dev] Re: Single Authentication for an App
Hi Arnaud, I'll try it (should work i think) the X-FeatureRateLimit-Reset header question had actually nothing to do with the oauth question. in the docs i could not find what happens if the limit is reset. I guess after that every authenticated call will just work again So in my mind it should be something like (proglang neutral ;-] ) get authenticate data While not finished { get limit while not limit { do stuff with authenticated call get limit } if not finished wait until reset } finished On Apr 18, 6:29 pm, Arnaud Meunier arn...@twitter.com wrote: Hey Ton, There was a similar discussion on this ML a few days ago:http://bit.ly/icFfcC We do not expire access_token (unless a user explicitly rejects you app) so you don't have to go through the whole OAuth dance once someone approved your app. Store your user's access_token and implement a session handling system. Arnaud / @rno http://twitter.com/rno On Mon, Apr 18, 2011 at 5:20 AM, ton t...@winemaker.nl wrote: Hi. I've made an app (for browser and mobile device and Desktop) It works fine but every time I start the app I have to get a new PINnumber from Twitter. Is there a way to trust an application once and use the given trustdata for all the subsequent uses? Best rgds, Ton -- 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] The remote server returned an error: (401) Unauthorized.
I'm using TwitterVB and for some reason in the last week I've been receiving the following error. The remote server returned an error: (401) Unauthorized. I'm using the following code structure. http://twittervb.codeplex.com/wikipage?title=OAuth%20Web%20Tutorial Nothing changed. I've tried to reset my customer key/secret, that didn't work. I've tried to recreate the app, that didn't work. Do I have to wait for a propagation time period? Does Twitter restrict IP addresses? My website is sitting on a host. Any ideas? Thanks! Nathan -- 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] shell filtered search?
Hi all having a bit of trouble working out how to filter the public_timeline with some keywords like you can do with the streaming api. Sadly due to the nature of my app the streaming api is not suitable. Is what I'm asking possible? ideally something like... twurl 'track=london' /1/statuses/public_timeline.xml (I know this won't work but it i there to illustrate what i am asking about) Thanks in advance Ed -- 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: error 401 failed oauth_signature and token / javascript - qml
Hi again, So i've deleted my previous code, and started again to respect twitter's doc and oauth thing i've seen before. Here is my new code, header-based, calling the good endpoint url : function getSignature() { var nonce = OAuth.nonce(31); var time = OAuth.timestamp(); var parameters = [oauth_token=+oauth_token, oauth_consumer_key=+consumer_key, oauth_nonce=+nonce, oauth_signature_method=HMAC-SHA1, oauth_timestamp=+time,oauth_version=1.0]; parameters = parameters.sort(); var join = parameters.join(); var joindparameters = encodeURIComponent(join); var baseString = POST+encodeURIComponent(request_token_url)+ + joindparameters; var signature = b64_hmac_sha1(consumer_secret + + oauth_token_secret, baseString); console.log(signature); request_maker = new XMLHttpRequest(); request_maker.open(POST, request_token_url); request_maker.setRequestHeader(Content-Type, application/x-www- form-urlencoded); request_maker.onreadystatechange = oth_func; var data = OAuth oauth_nonce=\+nonce+\, oauth_signature_method=\HMAC-SHA1\, oauth_timestamp=\+time+\, oauth_consumer_key=\+consumer_key+\, oauth_signature= \+encodeURIComponent(signature)+\, oauth_version=\1.0\; console.log(data); request_maker.setRequestHeader(Authorization, data); request_maker.send(); } I'm totally sure about my basestring and my signature (checked with http://oauth.googlecode.com/svn/code/javascript/example/signature.html) I've tried with 2 composite signing key : first : consumer_secret + + oauth_token_secret second: consumer_secret + but it did not change anything. On Apr 19, 3:47 pm, galeyte gaetan...@gmail.com wrote: And i stop using OAuth javascript library, and i'm getting the same basestring and signature as oauth library examples Here is the authorization header i send : OAuth realm='', oauth_nonce=1W3hagbtydTy8GBfkqxS3imJUDUfINi, oauth_timestamp=1303220837, oauth_consumer_key=[CONSUMER_KEY], oauth_signature_method=HMAC-SHA1, oauth_version=1.0, oauth_signature=ik0d0OV6JzLxQ/yeddowfSQCQgg= On 19 avr, 14:44, galeyte gaetan...@gmail.com wrote: Ok so i've stopped using OAuth javascript library Here is my new code : function getSignature() { var nonce = OAuth.nonce(31); var time = OAuth.timestamp(); var parameters = [encodeURIComponent(oauth_token=+oauth_token), encodeURIComponent(oauth_consumer_key=+consumer_key), encodeURIComponent(oauth_nonce=+nonce), encodeURIComponent(oauth_signature_method=HMAC- SHA1),encodeURIComponent(oauth_timestamp=+time), encodeURIComponent(oauth_version=1.0)]; parameters = parameters.sort(); var join = parameters.join(); var joindparameters = encodeURIComponent(join); var baseString = POST+encodeURIComponent(request_token_url)+ + joindparameters; console.log(baseString = + baseString); var signature = b64_hmac_sha1(consumer_secret + +oauth_token_secret, baseString); console.log(signature); request_maker = new XMLHttpRequest(); request_maker.open(POST, request_token_url); var data = OAuth realm='', oauth_nonce=+nonce+, oauth_timestamp=+time+, oauth_consumer_key=+consumer_key+, oauth_signature_method=HMAC-SHA1, oauth_version=1.0, oauth_signature=+signature; console.log(data); request_maker.setRequestHeader(Authorization, data); request_maker.onreadystatechange = oth_func; request_maker.send(); } and here is the BaseString it generates : POSThttps%3A%2F%2Fapi.twitter.com%2Foauth %2Frequest_tokenoauth_consumer_key%253D[OAUTH_CONSUMER_KEY] %26oauth_nonce%253D9HQfzLWlhqFpZAaURHNHr5bkpvMlweg %26oauth_signature_method%253DHMAC-SHA1%26oauth_timestamp %253D1303216955%26oauth_token%253DOAUTH_TOKEN%26oauth_version%253D1.0 and here is the signature : N2K3D1ZjAd7h8urLAjeyUSTWFUU= I've tried generate the signature with composite signing key : consumer_secret + + token_secret and without the token_secret On 19 avr, 11:08, galeyte gaetan...@gmail.com wrote: Hi, Thanks for answering my question. I've tried a lot of things to reach oauth/request_token, and i've tried : request_maker.open(POST, https://api.twitter.com/oauth/ request_token) but nothing has changed ! here is my new code : function signForm() { accessor = { consumerSecret: consumer_secret , tokenSecret : oauth_token_secret}; message = { action: https://api.twitter.com/oauth/request_token; , method: POST , parameters: [] }; message.parameters.push([oauth_consumer_key=, consumer_key]); message.parameters.push([oauth_callback=, oauth_callback]); message.parameters.push([oauth_signature_method=, signature_method]); OAuth.setTimestampAndNonce(message); message.parameters.push([oauth_version=, oauth_version]); OAuth.SignatureMethod.sign(message, accessor); return true; }
Re: [twitter-dev] Re: 401 Unauthorized Responses to requests signed with whitelisted account
Hi Chris, Our policy team are the beat ones to contact about this as they have access to the information about why the app was suspended. You can contact them through a...@twitter.com . When you contact them let then know what you've put in the email below and include the ticket number of your previous communication with them. They will be able to let you know the next steps. Best @themattharris On Apr 19, 2011, at 8:57, Christopher Stolte stolte...@gmail.com wrote: Hi Matt, Thank you so much for your timely response. Your suggestion was very helpful - I logged the response body and am seeing the following error: Invalid / suspended application I really don't know why that would be - does that mean that we are blacklisted? I should point out a few things that you will probably want to know: 1. We have a conservative and fairly sophisticated throttling system to prevent us from over-stepping the rate limit (I don't think that's the problem...) 2. On Saturday I received a message from the API support team confirming that our whitelisted account was in good standing (can provide the message if it's helpful) 3. We've seen the rate limit reported in the response change back and forth somewhat sporadically... Thank you again for any help you can provide - in general we are very pleased with the API and we certainly appreciate your support! Best, Chris On Apr 18, 3:44 pm, Matt Harris thematthar...@twitter.com wrote: Hi Christopher, Could you attempt to get the response body for the request either by repeating the request or enhancing your logs. The reason for the 401 is communicated in the response body and knowing that will help explain what is going on. Best, @themattharris Developer Advocate, Twitterhttp://twitter.com/themattharris On Mon, Apr 18, 2011 at 11:23 AM, Christopher Stolte stolte...@gmail.comwrote: Hello, I am a Java developer working on a web application that makes use of the Twitter API. We use the Signpost library (version 1.2.1.1) to perform OAuth and issue API requests, and have been doing so successfully for months. We have been signing our requests with a whitelisted key and secret that has a 20,000 request/hour rate limit. In the last few days, we started getting only 401 Not Authorized responses when using these credentials. Upon looking back at our server logs, I notice other requests failures dating back to at least Feb 17, but they are sporadic. Error messages look like this: WARN org.apache.http.impl.client.DefaultHttpClient Authentication error: Unable to respond to any of these challenges: {oauth=WWW- Authenticate: OAuth realm=http://api.twitter.com} The response header shows 401 but no other enlightening information. I have paid attention to and read lots of other postings related to OAuth, and want to emphasize that our system has been working for quite a while - we make calls using the proper end points and so forth: http://api.twitter.com/1/users/show.json?user_id=[id] Something appears to have changed on Twitter's end but we don't know what. Can anyone shed some light on what might be happening? We have already verified with Twitter API support that our credentials should still be viable - perhaps there has been an inadvertent shutdown of that account? Thank you in advance for any help or guidance! Sincerely, Chris Stolte -- 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-dev] Listing old Twits
I would list the twits of a hash tag # of the last three months. The frequency of twits is low in this # hashtags. A maximum of 100 postings per month. Where can I find any documentation talking about? -- 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] The remote server returned an error: (401) Unauthorized.
Hi Nathan, So we can help diagnose the problem could you inspect the response body that comes back from your request to the API. It contains an explanation of why the 401 is being returned and let's us know how to proceed. Best @themattharris On Apr 19, 2011, at 11:17, The World Connection nathan.poeppel...@gmail.com wrote: I'm using TwitterVB and for some reason in the last week I've been receiving the following error. The remote server returned an error: (401) Unauthorized. I'm using the following code structure. http://twittervb.codeplex.com/wikipage?title=OAuth%20Web%20Tutorial Nothing changed. I've tried to reset my customer key/secret, that didn't work. I've tried to recreate the app, that didn't work. Do I have to wait for a propagation time period? Does Twitter restrict IP addresses? My website is sitting on a host. Any ideas? Thanks! Nathan -- 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] Site Streams beta update
Hi Developers, We know a lot of you are excited to get started with Site Streams ( http://dev.twitter.com/pages/site_streams ), but the API will continue to be in beta for at least the next few months as we continue preparing it for wider release. During the beta, the criteria we're looking for and applications we're interested in will change as needs criteria evolve. Before applying for the Site Streams beta, we ask that you've developed your application far enough along with User Streams and that you've already built the necessary status event consumption routines for a single-user scenario. This will prepare you to work with Site Streams at a faster clip when access is provided. Site Streams does not support any of the search/track features of the User Streams, so if your application requires these capabilities, Site Streams may not be the right fit. Some developers have asked for Site Streams access with the misunderstanding that it can provide a greater percentage of the firehose than the self-serve options available to them today -- this is also not the case. If you're a developer who has hoped for early access to this beta program but has been unable to join and are looking for alternate implementation options in the meantime, our team is happy to discuss alternate strategies on this mailing list with you. Thanks for your continued patience as we continue productionizing this new platform feature. Taylor Singletary -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
[twitter-dev] Re: OAuth
Looks like this might be the case. If so, is there a web app out there that will let me authorize my app for a particular user (myself)? Thanks!! On Apr 19, 12:14 am, s4l4x planof...@gmail.com wrote: Hi all. I'm new to OAuth and have a basic question. Does using OAuth require the user to login via a web page or view to the twitter site in order to authenticate my application? Or can I do this on their behalf without needing to render web content? Perhaps this isn't my issue, but I just started with MGTwitterEngine and am getting 401's. Thanks!! -- 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] Site Streams beta update
On Tue, Apr 19, 2011 at 11:54 AM, Taylor Singletary taylorsinglet...@twitter.com wrote: Site Streams does not support any of the search/track features of the User Streams, so if your application requires these capabilities, Site Streams may not be the right fit. Some developers have asked for Site Streams access with the misunderstanding that it can provide a greater percentage of the firehose than the self-serve options available to them today -- this is also not the case. I haven't looked at Gnip recently - are the elevated levels of filter access available from them, or do they just sell 1/10 Firehose and 1/2 Firehose? Datasift? Seems to me like you're still going down the two throats to choke path - a user licenses part of the feed directly from Twitter and must license the rest of it from a third party adding value. In my experience that's *not* how enterprises buy stuff - the one throat to choke philosophy is how they *got* to be an enterprise. ;-) -- http://twitter.com/znmeb http://borasky-research.net A mathematician is a device for turning coffee into theorems. -- Paul Erdős -- 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: don't work Japanese
hoshi67 kunih...@koutake.com wrote: I have a problem it is about twitter API ex.http://stream.twitter.com/1/statuses/filter.json?track=* * is English word OK but * is Japanese KANJI HIRAGANA KATAKANA don't work :( so what can I do for this problem... @hoshi67 Hi, Did you encoded the UTF-8 Kanji charactors for URI like %xx%xx? As far as I know, the streaming filter API doesn't support the languages which do not separate words by white space charactors like Japanese. But you can pick up tweets if the track word is separated by white space charactors even if the Kanji or something. Unfortunately we can not pick up Kanji-track word in entence. For example, trach word is SAKURA in kanji and * is white space, you can pick up *SAKURA*KIREI works fine, but SAKURAgaKirei does not. -- 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: Site Streams beta update
Site Streams does not support any of the search/track features of the User Streams, so if your application requires these capabilities, Site Streams may not be the right fit. Are there plans for Site Streams to support search/track features in the future? What if you want to filter by a search query? - Mohan Arun -- 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: Listing old Twits
On Apr 19, 8:56 pm, Thony Conde thonyco...@gmail.com wrote: I would list the twits of a hash tag # of the last three months. The frequency of twits is low in this # hashtags. A maximum of 100 postings per month. Where can I find any documentation talking about? I think twitter only retains tweets that can be returned via search for a maximum of 14 days or so? - Mohan -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk