[twitter-dev] Re: Retrieving new tweets for 40-60 thousand users
The situation is: We have 60k users all with their own twitter account, so not a single account with 60k followers. Those 60k users all have people they follow and we want to give the user a message when someone they are following posted a tweet. Hope this clarify things a bit. I will have a look into the streaming api. Patrick On Jul 21, 6:27 am, "M. Edward (Ed) Borasky" wrote: > http://twitter.com/ModelSupplies;-) > -- > M. Edward (Ed) Boraskyhttp://borasky-research.nethttp://twitter.com/znmeb > > "A mathematician is a device for turning coffee into theorems." - Paul Erdos > > Quoting John Kalucki : > > > The trick is getting the 60k followers. > > > On Tue, Jul 20, 2010 at 2:42 PM, M. Edward (Ed) Borasky > > wrote: > >> Ah ... I thought he wanted 60K subscribers to each get an alert when one of > >> the people *they* were following tweeted. I suppose 60K users of a User > >> Streams application would put a worse strain on your infrastructure than > >> one > >> Firehose connection, though. ;-) > > >> I wasn't aware there was a "hard upper limit" on how many people a single > >> account could follow. I see quite a few people with tens of thousands of > >> followers that are following roughly the same number of people. So I > >> assumed > >> that if you had 50K or 100K followers, you'd be allowed to follow them all > >> back if you chose to do so. Is that not correct? > > >> -- > >> M. Edward (Ed) Borasky > >>http://borasky-research.nethttp://twitter.com/znmeb > > >> "A mathematician is a device for turning coffee into theorems." - Paul > >> Erdos > > >> Quoting John Kalucki : > > >>> We don't allow a single account to follow 60k users, so User Streams > >>> isn't going to work. > > >>> -John > > >>> On Tue, Jul 20, 2010 at 12:22 PM, M. Edward (Ed) Borasky > >>> wrote: > > Is this a server application (Software as a Service) or do you want this > to > run on a desktop? If you deployed it as a desktop application, you could > use > the User Streams capability. The nice thing about User Streams is that > you > get more than just messages when someone you're following tweets - you > get > many other events, and you can track by keyword and location as well. > -- > M. Edward (Ed) Borasky > http://borasky-research.nethttp://twitter.com/znmeb > > "A mathematician is a device for turning coffee into theorems." - Paul > Erdos > > Quoting PBro : > > > Hi, > > > We are developing an application with which we want to give a message > > to a user that one of his friends has posted a new tweet. > > This application is expected to have 40-60 thousand users, so separate > > api-call's isn't the best option. > > What would you advise as best practice for retrieving new tweets of a > > user's friends for this much users? > > > Patrick
Re: [twitter-dev] Re: Retrieving new tweets for 40-60 thousand users
Patrick, given this explanation, you will need a lot of streams. 60k users with an average of 100 friends (low estimate) Let's guess that every user shares 50% of the friends with others This gives us: 60.000 * 100 *.5 = 3 million In order to track 3 million users with the follow stream, you need: the biggest role for this ("birddog") allows following 400.000 users (http://dev.twitter.com/pages/streaming_api_methods) SO: You will need at least eight highest-level tracking privileges. Pascal On 21.Jul2010, at 11:51, PBro wrote: > The situation is: > We have 60k users all with their own twitter account, so not a single > account with 60k followers. > Those 60k users all have people they follow and we want to give the > user a message when someone they are following posted a tweet. > Hope this clarify things a bit. > I will have a look into the streaming api. > > Patrick
[twitter-dev] Re: Problems Loading Profile Images
I'm having the same problem too... But just sometimes. Anyway, looks like Twitter is better now... At least is not so slow as was a couple of weeks ago. On Jul 21, 4:59 am, Ron wrote: > Anyone noticing problems loading profile images (slow, no image > returned, hanging...)? Seems to show up mostly on Public and Search > endpoints.
[twitter-dev] Problems with Twitter4J and OAuth on Android
Cant figure out if this is a problem with Twitter4J or the Twitter API. I am trying to create an OAuth callback activity, started by a RequestToken, but the Request Token request is failing. DOES ANYONE KNOW IF GOOGLE HAS MADE THE TWITTER CLIENT AVAILABLE BY OPEN SOURCE YET? Twitter4J 2.1.2 Android Froyo 2.2 package com.sightlyinc.oauth.android; import java.util.Date; import twitter4j.Twitter; import twitter4j.TwitterFactory; import twitter4j.http.AccessToken; import twitter4j.http.RequestToken; import android.app.Activity; import android.content.Intent; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.net.Uri; import android.os.Bundle; import android.preference.PreferenceManager; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; public class SightlyOauthActivity extends Activity { private static final String TAG = SightlyOauthActivity.class.getName(); private Twitter twitter; private RequestToken requestToken; private SharedPreferences mSharedPreferences; private String CONSUMER_KEY = "yfKRsmTgi8UT8eHoV5Khrw"; private String CONSUMER_SECRET = "4MIf93Wv35Choa5zXM0gQqIUD8uUFNcvAq1TPuBc"; private String CALLBACK_URL = "sightlyoauth://oauth"; private EditText tweetTextView; private Button buttonLogin; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); mSharedPreferences = PreferenceManager.getDefaultSharedPreferences( getApplicationContext()); tweetTextView = (EditText)findViewById(R.id.TweetView); buttonLogin = (Button)findViewById(R.id.ButtonLogon); buttonLogin.setOnClickListener(new OnClickListener() { public void onClick(View v) { askOAuth(); } }); } /** * Open the browser and asks the user to authorize the app. Afterwards, we * redirect the user back here! */ private void askOAuth() { try { //setup properties, https was attempted and I was advised to //use HTTPS instead. System.setProperty("twitter4j.http.useSSL","false"); System.setProperty("twitter4j.oauth.consumerKey","MYKEY"); System.setProperty("twitter4j.oauth.consumerSecret","MYSECRET"); System.setProperty("twitter4j.oauth.requestTokenURL","http:// api.twitter.com/oauth/request_token"); System.setProperty("twitter4j.oauth.accessTokenURL","http:// api.twitter.com/oauth/access_token"); System.setProperty("twitter4j.oauth.authorizationURL","http:// api.twitter.com/oauth/authorize"); //get the instance Twitter twitter = new TwitterFactory().getInstance(); //THIS EXCEPTS WITH PERMISSION DENIED requestToken = twitter.getOAuthRequestToken(CALLBACK_URL); //set the request token info Toast.makeText(this, "Please authorize this app!", Toast.LENGTH_LONG).show(); this.startActivity(new Intent(Intent.ACTION_VIEW, Uri .parse(requestToken.getAuthenticationURL(; } catch (Exception e) { Log.e(TAG, e.getMessage(),e); Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show(); } } /** * As soon as the user successfully authorized the app, we are notified * here. Now we need to get the verifier from the callback URL, retrieve * token and token_secret and feed them to twitter4j (as well as consumer * key and secret). */ @Override protected void onNewIntent(Intent intent) { super.onNewIntent(intent); Uri uri = intent.getData(); if (uri != null && uri.toString().startsWith(CALLBACK_URL)) { String verifier = uri .getQueryParameter("oauth_verifier"); try { //this user has verified AccessToken accessToken = twitter.getOAuthAccessToken(requestToken, verifier); //save the access token Editor e = mSharedPreferences.edit(); e.putString("AccessToken.token", accessToken.getToken());
[twitter-dev] [search api] is it possible to search replies from a certain status_id?
hi guys, I need monitor replies from certain status. I would like to use search api, but according to search api doc it's impossible. I only ask you to know for sure. for example, I would like to be able ask for search api for replies from a status providing in_reply_to_status_id value. the only way I found is to ask for user timeline and check manually the in_reply_to_status_id attribute. is it the better way? tks in advance Arian
[twitter-dev] Twitter Stream API - Location filtering limited to the Western Hemisphere?
I'm attempting to stream Tweets from the UK as a whole(filtering further with tracking words), using Twitters stream API, however I'm having trouble with my bounding box. The LAT/LON pairs I'm using to define a bounding box of the whoe UK(Ire included) is as follows. -9.05, 48.77, 2.19, 58.88 However when I try to use this with the Twitter stream API, it states the following error message. Location track must be less than 1 degrees on a side: LocationTrack(48.77,-9.05,58.88,2.19) I can't imagine that Twitter do not allow you a specify a bounding box that covers an area that crosses between the negative/positive LAT. Am I missing something here, or would this mean that Twitter only allow you to stream if you are in the Wester hemishphere, effectively? If anyone has a suggest as to how I might be able to over-come this, I'd be very interested in hearing you out.
[twitter-dev] Re: Issues with OAuth
Hi Matt, Very appreciate your response! It is working now after I quoted the oauth values. So, the quoting matters. Also, Consumer token was in place of OAuth one, and vice versa. Thanks a lot, Kostya On Jul 21, 1:13 am, Matt Harris wrote: > Hey Kostya, > > I've taken a quick look at your POST headers and noticed a couple of things: > > 1) Whilst it shouldn't matter the streaming API can be very particular about > the headers you send so I recommend you quote your OAuth values, > e.g. oauth_nonce="Rb34D3rVEetj" > > 2) Your OAuth token looks like a consumer token rather than a user one. Are > you authenticating against the streaming API using your user token and > secret? > > Hope that helps, > > Matt > > On Tue, Jul 20, 2010 at 3:04 PM, Taylor Singletary < > > > > taylorsinglet...@twitter.com> wrote: > > Hi Kostya, > > > I'm unable to reproduce your issue, unfortunately. Are you still getting a > > 500 error when trying to connect to streaming via OAuth? Have you tried > > using a different access token or even API key? Does the same code/keys work > > against the REST API? > > > Taylor > > > On Tue, Jul 20, 2010 at 2:58 PM, Kostya Nikolayev > > wrote: > > >> Taylor, > > >> Did the details I posted help to identify the issue? > > >> Thanks, > >> Kostya > > >> On Jul 20, 9:56 pm, ap wrote: > >> > Looks like the oAuth access token issue is back! Started getting 500's > >> > from Twitter API a few minutes ago. > > >> > On Jul 20, 11:38 am, Kostya Nikolayev wrote: > > >> > > Taylor! > > >> > > This is what I'm sending: > > >> > > POST /1/statuses/filter.json HTTP/1.1\r\nHost: stream.twitter.com\r > >> > > \nUser-Agent: TweetStream\r\nAuthorization: OAuth > >> > > oauth_nonce=0IblKRcN17LUBG6zMnQk6DVrObhzcZowIVpPLtsRviU, > >> > > oauth_signature=rbGAlSp1VIbuXbk4Wr99jumyi5o%3D, > >> > > oauth_signature_method=HMAC-SHA1, oauth_timestamp=1279640138, > >> > > oauth_consumer_key=150423549-eAqqrDB7nsbvxE85cHValKZazJ6z4137CEJ6Bnfn, > >> > > oauth_token=tnruTl8uNRwGvICnzYpww, oauth_version=1.0\r\nContent-type: > >> > > application/x-www-form-urlencoded\r\nContent-length: 13\r\n\r > >> > > \ntrack=twitter > > >> > > Signature base string is: > > >> > > POST&http%3A%2F%2Fstream.twitter.com%2F1%2Fstatuses > >> > > %2Ffilter.json&oauth_consumer_key%3D150423549- > >> > > eAqqrDB7nsbvxE85cHValKZazJ6z4137CEJ6Bnfn%26oauth_nonce > > >> %3D0IblKRcN17LUBG6zMnQk6DVrObhzcZowIVpPLtsRviU%26oauth_signature_method > >> > > %3DHMAC-SHA1%26oauth_timestamp%3D1279640138%26oauth_token > >> > > %3DtnruTl8uNRwGvICnzYpww%26oauth_version%3D1.0%26track%3D > > >> > > Thanks, > >> > > Kostya > > >> > > On Jul 20, 6:18 pm, Taylor Singletary > >> > > wrote: > > >> > > > Hi Kostya, > > >> > > > I'm able to connect to the streaming API over OAuth fine at the > >> moment. > > >> > > > Can you share the full URL, HTTP method, and parameters that you are > >> trying > >> > > > to access? If possible, also your signature base string? > > >> > > > Taylor > > >> > > > On Tue, Jul 20, 2010 at 8:09 AM, Kostya Nikolayev < > >> kostya1...@gmail.com>wrote: > > >> > > > > Taylor, > > >> > > > > Has Sreaming API OAuth been affected ? > > >> > > > > Authenticating with the following oauth header gives 500 to me: > >> > > > > "OAuth oauth_nonce=N9wgHt2uPw8HqRwtOpjuVDSeuVYmc8UGDF8H0237v0, > >> > > > > oauth_signature=ALUT7tKXK%2Fw57SnJulj8x1l%2F7%2Fk%3D, > >> > > > > oauth_signature_method=HMAC-SHA1, oauth_timestamp=1279638245, > > >> oauth_consumer_key=150423549-eAqqrDB7nsbvxE85cHValKZazJ6z4137CEJ6Bnfn, > >> > > > > oauth_token=tnruTl8uNRwGvICnzYpww, oauth_version=1.0" > > >> > > > > Is it Streaming API OAuth issue? > > >> > > > > Thanks, > >> > > > > Kostya > > >> > > > > On Jul 19, 10:59 pm, Taylor Singletary < > >> taylorsinglet...@twitter.com> > >> > > > > wrote: > >> > > > > > Hi Ap, > > >> > > > > > This is the right place for reporting issues like this -- well, > >> one of > >> > > > > the > >> > > > > > right places anyway -- we have some issues with OAuth today that > >> are > >> > > > > related > >> > > > > > to some wider issues related to updating objects associated with > >> users > >> > > > > (like > >> > > > > > access tokens). > > >> > > > > > We hope to have this fixed soon! > > >> > > > > > Thanks, > >> > > > > > Taylor > > >> > > > > > On Mon, Jul 19, 2010 at 12:53 PM, ap > >> wrote: > >> > > > > > > I've been experiencing OAuth issues with my app today. If I'm > >> already > >> > > > > > > logged into twitter, the OAuth redirects to my app just fine. > >> However, > >> > > > > > > if I have to land on the authentication page and enter my > >> username and > >> > > > > > > password and click submit, I get the following error: > > >> > > > > > > Mon Jul 19 15:40:47 EDT 2010 : Twitter exception: > >> > > > > > > TwitterException{message=500:Something is broken. Please post > >> to the > >> > > > > > > group so the Twitter team can investigate.[Some HTML here], > >> > > > > > > statusCode=500, retryAfter=0, rateLimitStatus=null} > > >> > >
[twitter-dev] Re: Coming soon: a solution for Open Source applications using OAuth with the Twitter API
Any further news on this? It's been three weeks since you were "hoping to roll [it] out more widely this week". I've got an app registered and am starting to code it up, but would like to use the key_exchange method instead, since there's no way at all to hide the consumer secret in a python script. Thanks, - Johnson On Jun 28, 8:02 am, Taylor Singletary wrote: > The answer is soon! :) We hope to roll this out more widely this week. > > On Mon, Jun 28, 2010 at 7:56 AM, Decklin Foster wrote: > > > Taylor Singletary wrote: > > > We're waiting on a few minor bug fixes to be in place before rolling this > > > out to a wider audience. I'll post a new message when things are good to > > go > > > and we're ready to accept applications into the feature. > > > Any update or ETA on this? I have an app that I'm eager to test out. > > (I notice that if you openhttp://dev.twitter.com/apps/key_exchange > > with a valid oauth_consumer_key, instead of a 404 there is a page that > > says "Sorry, key exchange is not permitted for this application." Does > > this mean the answer is "soon"?) > > > -- > > things change. > > deck...@red-bean.com
Re: [twitter-dev] Twitter Stream API - Location filtering limited to the Western Hemisphere?
On 07/21/10 15:13, James wrote: > I'm attempting to stream Tweets from the UK as a whole(filtering > further with tracking words), using Twitters stream API, however I'm > having trouble with my bounding box. > > The LAT/LON pairs I'm using to define a bounding box of the whoe > UK(Ire included) is as follows. > > -9.05, 48.77, 2.19, 58.88 > > However when I try to use this with the Twitter stream API, it states > the following error message. > > Location track must be less than 1 degrees on a side: > LocationTrack(48.77,-9.05,58.88,2.19) > > I can't imagine that Twitter do not allow you a specify a bounding box > that covers an area that crosses between the negative/positive LAT. Am > I missing something here, or would this mean that Twitter only allow > you to stream if you are in the Wester hemishphere, effectively? > > If anyone has a suggest as to how I might be able to over-come this, > I'd be very interested in hearing you out. > Just a thought, but the error says that the bounding box must be at most one degree on each side... and that box is about 11x10. It does seem like a bit of a restriction, but still... D
[twitter-dev] Statuses/friends previous cursor broken
Hi. I am having the same problem as several others reported, where the result of a statuses/friends sends back a previous cursor which is not correct. The thread on this, from april or may, died with no resolution. I notice that twitter itself has this same problem, although twitter seems to use page=nnn instead of cursor=nnn, if you try to go back to previous, it will list no users. Is a fix planned for this? thanks, Mark
Re: [twitter-dev] Statuses/friends previous cursor broken
Yup, I encountered this as well while trying to figure out count differences in what twitter reports on the number of followers and what the api gives. Seems to be off by one number. So flipping between pages on twitter itself (followers list) I did get those blank results. I found I had blocked a user a while back with twitter, and this person was still being listed with results in the api but not on twitter itself. Might have thrown off the count that way. Took care of the so called blocked user, but unblocking and reblocking it. count was still off. But the follower was no longer in my api results. Which is a good thing. Still not sure why counts differ. anyways, sorry for bringing up this count difference. I just wanted to say that I've came across the "blank" pages issue while flipping back thru the followers list like Mark had mentioned. On Wed, Jul 21, 2010 at 11:17 AM, Mark Krieger wrote: > Hi. I am having the same problem as several others reported, where the > result of a statuses/friends sends back a previous cursor which is not > correct. The thread on this, from april or may, died with no > resolution. I notice that twitter itself has this same problem, > although twitter seems to use page=nnn instead of cursor=nnn, if you > try to go back to previous, it will list no users. > > Is a fix planned for this? > > thanks, > > Mark
Re: [twitter-dev] Twitter Stream API - Location filtering limited to the Western Hemisphere?
If you need larger bounding boxes, you can request a higher access level. You can also assemble a number of smaller bounding boxes into a larger box to cover more area. So, you can divvy up your allocation into a contiguous area, or multiple discontinuous regions. If there's a bug on creating a legally-sized bounding box that straddle one or both of the prime meridian or the equator, we'll certainly fix that. Given the proportion of geo-tagged tweets, perhaps we should indeed make these boxes bigger for the default access role. -John On Wed, Jul 21, 2010 at 8:08 AM, Dave Ingram wrote: > On 07/21/10 15:13, James wrote: >> I'm attempting to stream Tweets from the UK as a whole(filtering >> further with tracking words), using Twitters stream API, however I'm >> having trouble with my bounding box. >> >> The LAT/LON pairs I'm using to define a bounding box of the whoe >> UK(Ire included) is as follows. >> >> -9.05, 48.77, 2.19, 58.88 >> >> However when I try to use this with the Twitter stream API, it states >> the following error message. >> >> Location track must be less than 1 degrees on a side: >> LocationTrack(48.77,-9.05,58.88,2.19) >> >> I can't imagine that Twitter do not allow you a specify a bounding box >> that covers an area that crosses between the negative/positive LAT. Am >> I missing something here, or would this mean that Twitter only allow >> you to stream if you are in the Wester hemishphere, effectively? >> >> If anyone has a suggest as to how I might be able to over-come this, >> I'd be very interested in hearing you out. >> > Just a thought, but the error says that the bounding box must be at most > one degree on each side... and that box is about 11x10. It does seem > like a bit of a restriction, but still... > > > D >
Re: [twitter-dev] Twitter Stream API - Location filtering limited to the Western Hemisphere?
Quoting John Kalucki : Given the proportion of geo-tagged tweets, perhaps we should indeed make these boxes bigger for the default access role. Any numbers you'd be willing to share? I'd hate to see you go with bigger boxes only to have to shrink them again when location picks up in Twitter hot-spots like PDX and SFO. "Spritzer" dropping from 5% to 1% is kinda fresh in my mind. ;-) -- M. Edward (Ed) Borasky http://borasky-research.net http://twitter.com/znmeb "A mathematician is a device for turning coffee into theorems." - Paul Erdos
[twitter-dev] Re: Twitter Stream API - Location filtering limited to the Western Hemisphere?
Ah, very true - apologies I mis-understood the meaning of 'degree'. Thanks, I understand the problem now. Seidr On Jul 21, 4:08 pm, Dave Ingram wrote: > On 07/21/10 15:13, James wrote: > > > I'm attempting to stream Tweets from the UK as a whole(filtering > > further with tracking words), using Twitters stream API, however I'm > > having trouble with my bounding box. > > > The LAT/LON pairs I'm using to define a bounding box of the whoe > > UK(Ire included) is as follows. > > > -9.05, 48.77, 2.19, 58.88 > > > However when I try to use this with the Twitter stream API, it states > > the following error message. > > > Location track must be less than 1 degrees on a side: > > LocationTrack(48.77,-9.05,58.88,2.19) > > > I can't imagine that Twitter do not allow you a specify a bounding box > > that covers an area that crosses between the negative/positive LAT. Am > > I missing something here, or would this mean that Twitter only allow > > you to stream if you are in the Wester hemishphere, effectively? > > > If anyone has a suggest as to how I might be able to over-come this, > > I'd be very interested in hearing you out. > > Just a thought, but the error says that the bounding box must be at most > one degree on each side... and that box is about 11x10. It does seem > like a bit of a restriction, but still... > > D
[twitter-dev] Re: Issues with OAuth
Matt, Another question I believe you may clarify. Streaming API over OAuth works fine if track only one item: "track=sun" When I want to track multiple items like "track=sun,microsoft" I'm getting 401 There is what I'm sending: POST /1/statuses/filter.json HTTP/1.1\r\nHost: stream.twitter.com\r \nUser-Agent: TweetStream\r\nAuthorization: OAuth oauth_nonce="mTzWO7xxDbK11EvFJ1d90jXI2MMM8jN1b3Eh4KTZk", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1279727860", oauth_signature="SpY5JkbnWBWkI5qCzOWUMHUTNgM%3D", oauth_consumer_key="tnruTl8uNRwGvICnzYpww", oauth_token="150423549- eAqqrDB7nsbvxE85cHValKZazJ6z4137CEJ6Bnfn", oauth_version="1.0"\r \nContent-type: application/x-www-form-urlencoded\r\nContent-length: 21\r\n\r\ntrack=sun%2Cmicrosoft Signature base string is: POST&http%3A%2F%2Fstream.twitter.com%2F1%2Fstatuses %2Ffilter.json&oauth_consumer_key%3DtnruTl8uNRwGvICnzYpww%26oauth_nonce %3DmTzWO7xxDbK11EvFJ1d90jXI2MMM8jN1b3Eh4KTZk%26oauth_signature_method %3DHMAC-SHA1%26oauth_timestamp%3D1279727860%26oauth_token%3D150423549- eAqqrDB7nsbvxE85cHValKZazJ6z4137CEJ6Bnfn%26oauth_version%3D1.0%26track %3Dsun%2Cmicrosoft Thanks, Kostya On Jul 21, 5:17 pm, Kostya Nikolayev wrote: > Hi Matt, > > Very appreciate your response! > > It is working now after I quoted the oauth values. > So, the quoting matters. > > Also, Consumer token was in place of OAuth one, and vice versa. > > Thanks a lot, > Kostya > > On Jul 21, 1:13 am, Matt Harris wrote: > > > Hey Kostya, > > > I've taken a quick look at your POST headers and noticed a couple of things: > > > 1) Whilst it shouldn't matter the streaming API can be very particular about > > the headers you send so I recommend you quote your OAuth values, > > e.g. oauth_nonce="Rb34D3rVEetj" > > > 2) Your OAuth token looks like a consumer token rather than a user one. Are > > you authenticating against the streaming API using your user token and > > secret? > > > Hope that helps, > > > Matt > > > On Tue, Jul 20, 2010 at 3:04 PM, Taylor Singletary < > > > taylorsinglet...@twitter.com> wrote: > > > Hi Kostya, > > > > I'm unable to reproduce your issue, unfortunately. Are you still getting a > > > 500 error when trying to connect to streaming via OAuth? Have you tried > > > using a different access token or even API key? Does the same code/keys > > > work > > > against the REST API? > > > > Taylor > > > > On Tue, Jul 20, 2010 at 2:58 PM, Kostya Nikolayev > > > wrote: > > > >> Taylor, > > > >> Did the details I posted help to identify the issue? > > > >> Thanks, > > >> Kostya > > > >> On Jul 20, 9:56 pm, ap wrote: > > >> > Looks like the oAuth access token issue is back! Started getting 500's > > >> > from Twitter API a few minutes ago. > > > >> > On Jul 20, 11:38 am, Kostya Nikolayev wrote: > > > >> > > Taylor! > > > >> > > This is what I'm sending: > > > >> > > POST /1/statuses/filter.json HTTP/1.1\r\nHost: stream.twitter.com\r > > >> > > \nUser-Agent: TweetStream\r\nAuthorization: OAuth > > >> > > oauth_nonce=0IblKRcN17LUBG6zMnQk6DVrObhzcZowIVpPLtsRviU, > > >> > > oauth_signature=rbGAlSp1VIbuXbk4Wr99jumyi5o%3D, > > >> > > oauth_signature_method=HMAC-SHA1, oauth_timestamp=1279640138, > > >> > > oauth_consumer_key=150423549-eAqqrDB7nsbvxE85cHValKZazJ6z4137CEJ6Bnfn, > > >> > > oauth_token=tnruTl8uNRwGvICnzYpww, oauth_version=1.0\r\nContent-type: > > >> > > application/x-www-form-urlencoded\r\nContent-length: 13\r\n\r > > >> > > \ntrack=twitter > > > >> > > Signature base string is: > > > >> > > POST&http%3A%2F%2Fstream.twitter.com%2F1%2Fstatuses > > >> > > %2Ffilter.json&oauth_consumer_key%3D150423549- > > >> > > eAqqrDB7nsbvxE85cHValKZazJ6z4137CEJ6Bnfn%26oauth_nonce > > > >> %3D0IblKRcN17LUBG6zMnQk6DVrObhzcZowIVpPLtsRviU%26oauth_signature_method > > >> > > %3DHMAC-SHA1%26oauth_timestamp%3D1279640138%26oauth_token > > >> > > %3DtnruTl8uNRwGvICnzYpww%26oauth_version%3D1.0%26track%3D > > > >> > > Thanks, > > >> > > Kostya > > > >> > > On Jul 20, 6:18 pm, Taylor Singletary > > >> > > wrote: > > > >> > > > Hi Kostya, > > > >> > > > I'm able to connect to the streaming API over OAuth fine at the > > >> moment. > > > >> > > > Can you share the full URL, HTTP method, and parameters that you > > >> > > > are > > >> trying > > >> > > > to access? If possible, also your signature base string? > > > >> > > > Taylor > > > >> > > > On Tue, Jul 20, 2010 at 8:09 AM, Kostya Nikolayev < > > >> kostya1...@gmail.com>wrote: > > > >> > > > > Taylor, > > > >> > > > > Has Sreaming API OAuth been affected ? > > > >> > > > > Authenticating with the following oauth header gives 500 to me: > > >> > > > > "OAuth oauth_nonce=N9wgHt2uPw8HqRwtOpjuVDSeuVYmc8UGDF8H0237v0, > > >> > > > > oauth_signature=ALUT7tKXK%2Fw57SnJulj8x1l%2F7%2Fk%3D, > > >> > > > > oauth_signature_method=HMAC-SHA1, oauth_timestamp=1279638245, > > > >> oauth_consumer_key=150423549-eAqqrDB7nsbvxE85cHValKZazJ6z4137CEJ6Bnfn, > > >> > > > > oauth_token=tnruTl8uNRwGvICnzYpww, oauth_version=1.0" > > > >> > > > > Is it Streaming API OA
Re: [twitter-dev] Re: Issues with OAuth
Hi Kostya, You're close on getting the comma-separation to work. You've correctly URL encoded it for your POST body, but for the OAuth signature base string, it'll need to be doubly encoded. Your base string should be something like: POST&http%3A%2F%2Fstream.twitter.com%2F1%2Fstatuses %2Ffilter.json&oauth_consumer_key%3DtnruTl8uNRwGvICnzYpww%26oauth_nonce %3DmTzWO7xxDbK11EvFJ1d90jXI2MMM8jN1b3Eh4KTZk%26oauth_signature_method %3DHMAC-SHA1%26oauth_timestamp%3D1279727860%26oauth_token%3D150423549- eAqqrDB7nsbvxE85cHValKZazJ6z4137CEJ6Bnfn%26oauth_version%3D1.0%26track %3Dsun%252Cmicrosoft %2C becomes %252C.. Taylor On Wed, Jul 21, 2010 at 9:09 AM, Kostya Nikolayev wrote: > Matt, > > Another question I believe you may clarify. > > Streaming API over OAuth works fine if track only one item: > "track=sun" > When I want to track multiple items like "track=sun,microsoft" I'm > getting 401 > > There is what I'm sending: > > POST /1/statuses/filter.json HTTP/1.1\r\nHost: stream.twitter.com\r > \nUser-Agent: TweetStream\r\nAuthorization: OAuth > oauth_nonce="mTzWO7xxDbK11EvFJ1d90jXI2MMM8jN1b3Eh4KTZk", > oauth_signature_method="HMAC-SHA1", oauth_timestamp="1279727860", > oauth_signature="SpY5JkbnWBWkI5qCzOWUMHUTNgM%3D", > oauth_consumer_key="tnruTl8uNRwGvICnzYpww", oauth_token="150423549- > eAqqrDB7nsbvxE85cHValKZazJ6z4137CEJ6Bnfn", oauth_version="1.0"\r > \nContent-type: application/x-www-form-urlencoded\r\nContent-length: > 21\r\n\r\ntrack=sun%2Cmicrosoft > > Signature base string is: > > POST&http%3A%2F%2Fstream.twitter.com%2F1%2Fstatuses > %2Ffilter.json&oauth_consumer_key%3DtnruTl8uNRwGvICnzYpww%26oauth_nonce > %3DmTzWO7xxDbK11EvFJ1d90jXI2MMM8jN1b3Eh4KTZk%26oauth_signature_method > %3DHMAC-SHA1%26oauth_timestamp%3D1279727860%26oauth_token%3D150423549- > eAqqrDB7nsbvxE85cHValKZazJ6z4137CEJ6Bnfn%26oauth_version%3D1.0%26track > %3Dsun%2Cmicrosoft > > Thanks, > Kostya > > On Jul 21, 5:17 pm, Kostya Nikolayev wrote: >> Hi Matt, >> >> Very appreciate your response! >> >> It is working now after I quoted the oauth values. >> So, the quoting matters. >> >> Also, Consumer token was in place of OAuth one, and vice versa. >> >> Thanks a lot, >> Kostya >> >> On Jul 21, 1:13 am, Matt Harris wrote: >> >> > Hey Kostya, >> >> > I've taken a quick look at your POST headers and noticed a couple of >> > things: >> >> > 1) Whilst it shouldn't matter the streaming API can be very particular >> > about >> > the headers you send so I recommend you quote your OAuth values, >> > e.g. oauth_nonce="Rb34D3rVEetj" >> >> > 2) Your OAuth token looks like a consumer token rather than a user one. Are >> > you authenticating against the streaming API using your user token and >> > secret? >> >> > Hope that helps, >> >> > Matt >> >> > On Tue, Jul 20, 2010 at 3:04 PM, Taylor Singletary < >> >> > taylorsinglet...@twitter.com> wrote: >> > > Hi Kostya, >> >> > > I'm unable to reproduce your issue, unfortunately. Are you still getting >> > > a >> > > 500 error when trying to connect to streaming via OAuth? Have you tried >> > > using a different access token or even API key? Does the same code/keys >> > > work >> > > against the REST API? >> >> > > Taylor >> >> > > On Tue, Jul 20, 2010 at 2:58 PM, Kostya Nikolayev >> > > wrote: >> >> > >> Taylor, >> >> > >> Did the details I posted help to identify the issue? >> >> > >> Thanks, >> > >> Kostya >> >> > >> On Jul 20, 9:56 pm, ap wrote: >> > >> > Looks like the oAuth access token issue is back! Started getting 500's >> > >> > from Twitter API a few minutes ago. >> >> > >> > On Jul 20, 11:38 am, Kostya Nikolayev wrote: >> >> > >> > > Taylor! >> >> > >> > > This is what I'm sending: >> >> > >> > > POST /1/statuses/filter.json HTTP/1.1\r\nHost: stream.twitter.com\r >> > >> > > \nUser-Agent: TweetStream\r\nAuthorization: OAuth >> > >> > > oauth_nonce=0IblKRcN17LUBG6zMnQk6DVrObhzcZowIVpPLtsRviU, >> > >> > > oauth_signature=rbGAlSp1VIbuXbk4Wr99jumyi5o%3D, >> > >> > > oauth_signature_method=HMAC-SHA1, oauth_timestamp=1279640138, >> > >> > > oauth_consumer_key=150423549-eAqqrDB7nsbvxE85cHValKZazJ6z4137CEJ6Bnfn, >> > >> > > oauth_token=tnruTl8uNRwGvICnzYpww, >> > >> > > oauth_version=1.0\r\nContent-type: >> > >> > > application/x-www-form-urlencoded\r\nContent-length: 13\r\n\r >> > >> > > \ntrack=twitter >> >> > >> > > Signature base string is: >> >> > >> > > POST&http%3A%2F%2Fstream.twitter.com%2F1%2Fstatuses >> > >> > > %2Ffilter.json&oauth_consumer_key%3D150423549- >> > >> > > eAqqrDB7nsbvxE85cHValKZazJ6z4137CEJ6Bnfn%26oauth_nonce >> >> > >> %3D0IblKRcN17LUBG6zMnQk6DVrObhzcZowIVpPLtsRviU%26oauth_signature_method >> > >> > > %3DHMAC-SHA1%26oauth_timestamp%3D1279640138%26oauth_token >> > >> > > %3DtnruTl8uNRwGvICnzYpww%26oauth_version%3D1.0%26track%3D >> >> > >> > > Thanks, >> > >> > > Kostya >> >> > >> > > On Jul 20, 6:18 pm, Taylor Singletary >> > >> > > wrote: >> >> > >> > > > Hi Kostya, >> >> > >> > > > I'm able to connect to the streaming API over OAuth fine at the >> > >> moment. >> >> > >> >
[twitter-dev] Re: is it possible to search replies from a certain status_id?
Unfortunately, there isn't a single API method that allows this. >From the FAQ: http://dev.twitter.com/pages/api_faq#replies Q: How do I get all replies to a particular status? A: For now, there's not a great way to do this. We've heard the requests, though, and we'll be providing a solution for it before too long. On Jul 21, 8:15 am, arian wrote: > hi guys, > I need monitor replies from certain status. > I would like to use search api, but according to search api doc it's > impossible. > I only ask you to know for sure. > > for example, I would like to be able ask for search api for replies > from a status providing in_reply_to_status_id value. > > the only way I found is to ask for user timeline and check manually > the in_reply_to_status_id attribute. > is it the better way? > > tks in advance > Arian
[twitter-dev] Re: Issues with OAuth
Hi Taylor, Great! Worked like a charm with commas doubly encoded. Thanks, Kostya On Jul 21, 7:34 pm, Taylor Singletary wrote: > Hi Kostya, > > You're close on getting the comma-separation to work. You've correctly > URL encoded it for your POST body, but for the OAuth signature base > string, it'll need to be doubly encoded. > > Your base string should be something like: > POST&http%3A%2F%2Fstream.twitter.com%2F1%2Fstatuses > %2Ffilter.json&oauth_consumer_key%3DtnruTl8uNRwGvICnzYpww%26oauth_nonce > %3DmTzWO7xxDbK11EvFJ1d90jXI2MMM8jN1b3Eh4KTZk%26oauth_signature_method > %3DHMAC-SHA1%26oauth_timestamp%3D1279727860%26oauth_token%3D150423549- > eAqqrDB7nsbvxE85cHValKZazJ6z4137CEJ6Bnfn%26oauth_version%3D1.0%26track > %3Dsun%252Cmicrosoft > > %2C becomes %252C.. > > Taylor > > On Wed, Jul 21, 2010 at 9:09 AM, Kostya Nikolayev > wrote: > > Matt, > > > Another question I believe you may clarify. > > > Streaming API over OAuth works fine if track only one item: > > "track=sun" > > When I want to track multiple items like "track=sun,microsoft" I'm > > getting 401 > > > There is what I'm sending: > > > POST /1/statuses/filter.json HTTP/1.1\r\nHost: stream.twitter.com\r > > \nUser-Agent: TweetStream\r\nAuthorization: OAuth > > oauth_nonce="mTzWO7xxDbK11EvFJ1d90jXI2MMM8jN1b3Eh4KTZk", > > oauth_signature_method="HMAC-SHA1", oauth_timestamp="1279727860", > > oauth_signature="SpY5JkbnWBWkI5qCzOWUMHUTNgM%3D", > > oauth_consumer_key="tnruTl8uNRwGvICnzYpww", oauth_token="150423549- > > eAqqrDB7nsbvxE85cHValKZazJ6z4137CEJ6Bnfn", oauth_version="1.0"\r > > \nContent-type: application/x-www-form-urlencoded\r\nContent-length: > > 21\r\n\r\ntrack=sun%2Cmicrosoft > > > Signature base string is: > > > POST&http%3A%2F%2Fstream.twitter.com%2F1%2Fstatuses > > %2Ffilter.json&oauth_consumer_key%3DtnruTl8uNRwGvICnzYpww%26oauth_nonce > > %3DmTzWO7xxDbK11EvFJ1d90jXI2MMM8jN1b3Eh4KTZk%26oauth_signature_method > > %3DHMAC-SHA1%26oauth_timestamp%3D1279727860%26oauth_token%3D150423549- > > eAqqrDB7nsbvxE85cHValKZazJ6z4137CEJ6Bnfn%26oauth_version%3D1.0%26track > > %3Dsun%2Cmicrosoft > > > Thanks, > > Kostya > > > On Jul 21, 5:17 pm, Kostya Nikolayev wrote: > >> Hi Matt, > > >> Very appreciate your response! > > >> It is working now after I quoted the oauth values. > >> So, the quoting matters. > > >> Also, Consumer token was in place of OAuth one, and vice versa. > > >> Thanks a lot, > >> Kostya > > >> On Jul 21, 1:13 am, Matt Harris wrote: > > >> > Hey Kostya, > > >> > I've taken a quick look at your POST headers and noticed a couple of > >> > things: > > >> > 1) Whilst it shouldn't matter the streaming API can be very particular > >> > about > >> > the headers you send so I recommend you quote your OAuth values, > >> > e.g. oauth_nonce="Rb34D3rVEetj" > > >> > 2) Your OAuth token looks like a consumer token rather than a user one. > >> > Are > >> > you authenticating against the streaming API using your user token and > >> > secret? > > >> > Hope that helps, > > >> > Matt > > >> > On Tue, Jul 20, 2010 at 3:04 PM, Taylor Singletary < > > >> > taylorsinglet...@twitter.com> wrote: > >> > > Hi Kostya, > > >> > > I'm unable to reproduce your issue, unfortunately. Are you still > >> > > getting a > >> > > 500 error when trying to connect to streaming via OAuth? Have you tried > >> > > using a different access token or even API key? Does the same > >> > > code/keys work > >> > > against the REST API? > > >> > > Taylor > > >> > > On Tue, Jul 20, 2010 at 2:58 PM, Kostya Nikolayev > >> > > wrote: > > >> > >> Taylor, > > >> > >> Did the details I posted help to identify the issue? > > >> > >> Thanks, > >> > >> Kostya > > >> > >> On Jul 20, 9:56 pm, ap wrote: > >> > >> > Looks like the oAuth access token issue is back! Started getting > >> > >> > 500's > >> > >> > from Twitter API a few minutes ago. > > >> > >> > On Jul 20, 11:38 am, Kostya Nikolayev wrote: > > >> > >> > > Taylor! > > >> > >> > > This is what I'm sending: > > >> > >> > > POST /1/statuses/filter.json HTTP/1.1\r\nHost: > >> > >> > > stream.twitter.com\r > >> > >> > > \nUser-Agent: TweetStream\r\nAuthorization: OAuth > >> > >> > > oauth_nonce=0IblKRcN17LUBG6zMnQk6DVrObhzcZowIVpPLtsRviU, > >> > >> > > oauth_signature=rbGAlSp1VIbuXbk4Wr99jumyi5o%3D, > >> > >> > > oauth_signature_method=HMAC-SHA1, oauth_timestamp=1279640138, > >> > >> > > oauth_consumer_key=150423549-eAqqrDB7nsbvxE85cHValKZazJ6z4137CEJ6Bnfn, > >> > >> > > oauth_token=tnruTl8uNRwGvICnzYpww, > >> > >> > > oauth_version=1.0\r\nContent-type: > >> > >> > > application/x-www-form-urlencoded\r\nContent-length: 13\r\n\r > >> > >> > > \ntrack=twitter > > >> > >> > > Signature base string is: > > >> > >> > > POST&http%3A%2F%2Fstream.twitter.com%2F1%2Fstatuses > >> > >> > > %2Ffilter.json&oauth_consumer_key%3D150423549- > >> > >> > > eAqqrDB7nsbvxE85cHValKZazJ6z4137CEJ6Bnfn%26oauth_nonce > > >> > >> %3D0IblKRcN17LUBG6zMnQk6DVrObhzcZowIVpPLtsRviU%26oauth_signature_method > >> > >> > > %3DHMAC-SHA1%26oauth_timestamp%3D1279
Re: [twitter-dev] Statuses/friends previous cursor broken
Thanks for the emails on this one. It is a known issue which our engineering team are looking into. It is being tracked on our issue tracker here: http://code.google.com/p/twitter-api/issues/detail?id=1572 When we have news on the progress we'll update the ticket. Best, Matt On Wed, Jul 21, 2010 at 8:32 AM, Scott Marshall wrote: > Yup, I encountered this as well while trying to figure out count > differences in what twitter reports on the number of followers and > what the api gives. Seems to be off by one number. So flipping > between pages on twitter itself (followers list) I did get those blank > results. I found I had blocked a user a while back with twitter, and > this person was still being listed with results in the api but not on > twitter itself. Might have thrown off the count that way. Took care > of the so called blocked user, but unblocking and reblocking it. > count was still off. But the follower was no longer in my api > results. Which is a good thing. Still not sure why counts differ. > > anyways, sorry for bringing up this count difference. I just wanted > to say that I've came across the "blank" pages issue while flipping > back thru the followers list like Mark had mentioned. > > On Wed, Jul 21, 2010 at 11:17 AM, Mark Krieger > wrote: > > Hi. I am having the same problem as several others reported, where the > > result of a statuses/friends sends back a previous cursor which is not > > correct. The thread on this, from april or may, died with no > > resolution. I notice that twitter itself has this same problem, > > although twitter seems to use page=nnn instead of cursor=nnn, if you > > try to go back to previous, it will list no users. > > > > Is a fix planned for this? > > > > thanks, > > > > Mark > -- Matt Harris Developer Advocate, Twitter http://twitter.com/themattharris
[twitter-dev] Re: Statuses/friends previous cursor broken
Matt, Thank you. This has been open for about 4 months. I hope it will be fixed soon. For now I think I will need to do something on my own to program around it. Wish me good luck (: Mark On Jul 21, 1:37 pm, Matt Harris wrote: > Thanks for the emails on this one. It is a known issue which our engineering > team are looking into. It is being tracked on our issue tracker > here:http://code.google.com/p/twitter-api/issues/detail?id=1572 > > When we have news on the progress we'll update the ticket. > > Best, > Matt > > > > On Wed, Jul 21, 2010 at 8:32 AM, Scott Marshall wrote: > > Yup, I encountered this as well while trying to figure out count > > differences in what twitter reports on the number of followers and > > what the api gives. Seems to be off by one number. So flipping > > between pages on twitter itself (followers list) I did get those blank > > results. I found I had blocked a user a while back with twitter, and > > this person was still being listed with results in the api but not on > > twitter itself. Might have thrown off the count that way. Took care > > of the so called blocked user, but unblocking and reblocking it. > > count was still off. But the follower was no longer in my api > > results. Which is a good thing. Still not sure why counts differ. > > > anyways, sorry for bringing up this count difference. I just wanted > > to say that I've came across the "blank" pages issue while flipping > > back thru the followers list like Mark had mentioned. > > > On Wed, Jul 21, 2010 at 11:17 AM, Mark Krieger > > wrote: > > > Hi. I am having the same problem as several others reported, where the > > > result of a statuses/friends sends back a previous cursor which is not > > > correct. The thread on this, from april or may, died with no > > > resolution. I notice that twitter itself has this same problem, > > > although twitter seems to use page=nnn instead of cursor=nnn, if you > > > try to go back to previous, it will list no users. > > > > Is a fix planned for this? > > > > thanks, > > > > Mark > > -- > > Matt Harris > Developer Advocate, Twitterhttp://twitter.com/themattharris
Re: [twitter-dev] Re: Problems Loading Profile Images
Hi Everyone, We had some issues with profile updates and image uploads last week and early this week. Some images uploaded in that time period resulted in incorrect image URLs, and while this should now be fixed for more recently updated/created images, those with avatars saved while in this state will likely remain in that state until they re-upload their image. What kind of percentages are you seeing in regards to missing/broken images? Taylor On Wed, Jul 21, 2010 at 5:35 AM, luisg wrote: > I'm having the same problem too... But just sometimes. > Anyway, looks like Twitter is better now... At least is not so slow as > was a couple of weeks ago. > > On Jul 21, 4:59 am, Ron wrote: >> Anyone noticing problems loading profile images (slow, no image >> returned, hanging...)? Seems to show up mostly on Public and Search >> endpoints. >
Re: [twitter-dev] Problems with Twitter4J and OAuth on Android
Hi Clay, Just noticed that you have an API secret in this code sample you've provided -- you'll want to go to your application record and regenerate a new key/secret pair. As for the code itself -- I see you setting your consumer key and secret as constants near the top, but then in askOAuth you're using different values -- is this just a result of a bad paste? Taylor On Tue, Jul 20, 2010 at 11:18 PM, Clay Graham wrote: > Cant figure out if this is a problem with Twitter4J or the Twitter > API. I am trying to create an OAuth callback activity, started by a > RequestToken, but the Request Token request is failing. DOES ANYONE > KNOW IF GOOGLE HAS MADE THE TWITTER CLIENT AVAILABLE BY OPEN SOURCE > YET? > > Twitter4J 2.1.2 > Android Froyo 2.2 > > package com.sightlyinc.oauth.android; > > import java.util.Date; > > import twitter4j.Twitter; > import twitter4j.TwitterFactory; > import twitter4j.http.AccessToken; > import twitter4j.http.RequestToken; > import android.app.Activity; > import android.content.Intent; > import android.content.SharedPreferences; > import android.content.SharedPreferences.Editor; > import android.net.Uri; > import android.os.Bundle; > import android.preference.PreferenceManager; > import android.util.Log; > import android.view.View; > import android.view.View.OnClickListener; > import android.widget.Button; > import android.widget.EditText; > import android.widget.Toast; > > public class SightlyOauthActivity extends Activity { > > private static final String TAG = > SightlyOauthActivity.class.getName(); > > private Twitter twitter; > private RequestToken requestToken; > private SharedPreferences mSharedPreferences; > > private String CONSUMER_KEY = "yfKRsmTgi8UT8eHoV5Khrw"; > private String CALLBACK_URL = "sightlyoauth://oauth"; > > private EditText tweetTextView; > private Button buttonLogin; > > /** Called when the activity is first created. */ > �...@override > public void onCreate(Bundle savedInstanceState) { > super.onCreate(savedInstanceState); > setContentView(R.layout.main); > > mSharedPreferences = > PreferenceManager.getDefaultSharedPreferences( > getApplicationContext()); > > tweetTextView = > (EditText)findViewById(R.id.TweetView); > buttonLogin = (Button)findViewById(R.id.ButtonLogon); > buttonLogin.setOnClickListener(new OnClickListener() { > public void onClick(View v) { > askOAuth(); > } > }); > > } > > /** > * Open the browser and asks the user to authorize the app. > Afterwards, we > * redirect the user back here! > */ > private void askOAuth() { > try { > > //setup properties, https was attempted and I > was advised to > //use HTTPS instead. > > System.setProperty("twitter4j.http.useSSL","false"); > > System.setProperty("twitter4j.oauth.consumerKey","MYKEY"); > > System.setProperty("twitter4j.oauth.consumerSecret","MYSECRET"); > > System.setProperty("twitter4j.oauth.requestTokenURL","http:// > api.twitter.com/oauth/request_token"); > > System.setProperty("twitter4j.oauth.accessTokenURL","http:// > api.twitter.com/oauth/access_token"); > > System.setProperty("twitter4j.oauth.authorizationURL","http:// > api.twitter.com/oauth/authorize"); > > //get the instance > Twitter twitter = > new TwitterFactory().getInstance(); > > //THIS EXCEPTS WITH PERMISSION DENIED > requestToken = > twitter.getOAuthRequestToken(CALLBACK_URL); > > //set the request token info > Toast.makeText(this, "Please authorize this > app!", > Toast.LENGTH_LONG).show(); > > this.startActivity(new > Intent(Intent.ACTION_VIEW, Uri > > .parse(requestToken.getAuthenticationURL(; > > } catch (Exception e) { > Log.e(TAG, e.getMessage(),e); > Toast.makeText(this, e.getMessage(), > Toast.LENGTH_LONG).show(); > } > } > > /** > * As soon as the user successfully authorized the app, we are > notified > * here. Now we need to get the verifier from the callback > URL, > retrieve > * token and token_secret and feed them to twitter4j (as well > as > consumer > * key and secret). > */ > �...@override > protected void onNewIntent(Intent intent) { > > super.onNewIntent(intent); > > Uri uri = intent.getData(); > if (uri != null && > uri.toString().startsWith(CALLBACK_URL)) { > > St
[twitter-dev] Trying to do a GET after autenticating via OAuth
Hello everybody. I just achieved to autenticate via OAuth, and I'm trying to get user's data through account/verify_credentials but I think I'm not building correctly the composite signing key or something, mainly because I'm not able to fully understand all the different tokens I receive from Twitter. After I got my access token, I got: An oauth_token in the form of: /¿User-ID?/-/letters+numbers/ An oauth_token_secret Which one I should use to built the composite key? In http://dev.twitter.com/pages/auth they use the first oauth_token getted in the request token, and in the Resource request example they use the oauth_token_secret. These is the headers I sent: OAuth oauth_consumer_key="XX", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1279738886", oauth_nonce="a97ff8b71a313a03a650068e1e6b9bd8f31ad04f", oauth_version="1.0", oauth_token="- X", oauth_signature="0OFTpLp8o %2BL9%2B6o8mkRdBSS8I84%3D" and then I do a GET request to: http://api.twitter.com/1/account/verify_credentials.json But all I got is: 401 Unauthorized Failed to validate oauth signature and token
Re: [twitter-dev] Trying to do a GET after autenticating via OAuth
Hi there, If you've gotten to the point of retrieving an access token, it's likely you managed to get the composite signing key "right" (or your library handled it for you) -- as when you're exchanging the request token for an access token, you use the oauth_token_secret from the request token as part of the signing key. Are you using an OAuth library? When you're making a resource request such as one to verify_credentials, you'll use the oauth_token_secret you received in the access token step as part of the signing key: $consumer_secret + "&" + $oauth_token_secret Taylor On Wed, Jul 21, 2010 at 12:13 PM, clinisbut wrote: > Hello everybody. > > I just achieved to autenticate via OAuth, and I'm trying to get user's > data through account/verify_credentials but I think I'm not building > correctly the composite signing key or something, mainly because I'm > not able to fully understand all the different tokens I receive from > Twitter. > > After I got my access token, I got: > > An oauth_token in the form of: /¿User-ID?/-/letters+numbers/ > An oauth_token_secret > > Which one I should use to built the composite key? In > http://dev.twitter.com/pages/auth > they use the first oauth_token getted in the request token, and in the > Resource request example they use the oauth_token_secret. > > > These is the headers I sent: > > OAuth oauth_consumer_key="XX", > oauth_signature_method="HMAC-SHA1", oauth_timestamp="1279738886", > oauth_nonce="a97ff8b71a313a03a650068e1e6b9bd8f31ad04f", > oauth_version="1.0", oauth_token="- > X", oauth_signature="0OFTpLp8o > %2BL9%2B6o8mkRdBSS8I84%3D" > > and then I do a GET request to: > http://api.twitter.com/1/account/verify_credentials.json > > > But all I got is: > 401 Unauthorized > Failed to validate oauth signature and token > >
[twitter-dev] getStatusesMentions not working today....???
My application has used getStatusesMentions for many months, it is only failing when twitter has had some problem, like two days ago, and in that case, everything is flaky. Today it is failing, but everything else works fine. Is this a known problem today? getStatusesMentions always comes back today with bogus headers Mark
Re: [twitter-dev] Whitelist confirmation . . .
Hi there, We're a bit behind on processing whitelisting requests, as we had a hiatus of approving requests during the World Cup. Whitelisting is a privilege granted on a case-by-case basis (criteria and acceptance rates change over time), but we don't generally provide whitelisting for research or academic purposes. In most cases, researchers (and developers) wanting expanded access to the Search API would be better served by implementing the Streaming API instead. Rate limits are in place to ensure best performance for the highest number of users. While higher limits would benefit the speed at which many research projects may be completed, the vast majority will have to make do with the current rate limits. Rate limiting, whitelisting and their role within the Twitter ecosystem are reviewed frequently. Thanks, Taylor On Tue, Jul 20, 2010 at 7:34 PM, hkimscil wrote: > Hello, this is a followup message to the previous post at > http://groups.google.com/group/twitter-development-talk/browse_thread/thread/36a11ab23b42f22/48c15312a2aab773?lnk=gst&q=hkimscil#48c15312a2aab773 > . > > I am not still getting a confirmation for whitelist; and beginning to > think that I may not be approved :( . And I am worried about not > clarifying enough about my research work to the twitter. > > What I am trying to do is not builidn applications or services; > Rather, want to gather some data (tweets and retweets messages with > specific topics) in order to see how messages are diffused and how > they are possibly categorised or classified (if any, SEARCH API); and > how they are compared to agenda set by traditional mass media such as > newspapers and television. I am also interested in what kinds of > social relations exists in the message diffusion processes (REST > API). > > I have setup about 20 computers in order to collect necessary data -- > so that I don't have to use APIs for a long period of time. I have > setup the brief explanation about my research at > http://wiki.commres.org/Project~Twitter > > I would appreciate if anyone shed a light on what I went wrong (if I > did while requesting) and give some advice on how to persuade the > twitter for putting me on the whitelist. >
[twitter-dev] Re: Problems Loading Profile Images
Not seen it happen at all anymore since corrections were made. On Jul 21, 2:08 pm, Taylor Singletary wrote: > Hi Everyone, > > We had some issues with profile updates and image uploads last week > and early this week. Some images uploaded in that time period resulted > in incorrect image URLs, and while this should now be fixed for more > recently updated/created images, those with avatars saved while in > this state will likely remain in that state until they re-upload their > image. > > What kind of percentages are you seeing in regards to missing/broken images? > > Taylor > > On Wed, Jul 21, 2010 at 5:35 AM, luisg wrote: > > I'm having the same problem too... But just sometimes. > > Anyway, looks like Twitter is better now... At least is not so slow as > > was a couple of weeks ago. > > > On Jul 21, 4:59 am, Ron wrote: > >> Anyone noticing problems loading profile images (slow, no image > >> returned, hanging...)? Seems to show up mostly on Public and Search > >> endpoints.
[twitter-dev] Re: Trying to do a GET after autenticating via OAuth
I'm using an OAuth library I've developed in PHP. Do I need to pass all the parameters through the query also? On Jul 21, 9:25 pm, Taylor Singletary wrote: > Hi there, > > If you've gotten to the point of retrieving an access token, it's > likely you managed to get the composite signing key "right" (or your > library handled it for you) -- as when you're exchanging the request > token for an access token, you use the oauth_token_secret from the > request token as part of the signing key. Are you using an OAuth > library? > > When you're making a resource request such as one to > verify_credentials, you'll use the oauth_token_secret you received in > the access token step as part of the signing key: $consumer_secret + > "&" + $oauth_token_secret > > Taylor > > On Wed, Jul 21, 2010 at 12:13 PM, clinisbut wrote: > > Hello everybody. > > > I just achieved to autenticate via OAuth, and I'm trying to get user's > > data through account/verify_credentials but I think I'm not building > > correctly the composite signing key or something, mainly because I'm > > not able to fully understand all the different tokens I receive from > > Twitter. > > > After I got my access token, I got: > > > An oauth_token in the form of: /¿User-ID?/-/letters+numbers/ > > An oauth_token_secret > > > Which one I should use to built the composite key? > > Inhttp://dev.twitter.com/pages/auth > > they use the first oauth_token getted in the request token, and in the > > Resource request example they use the oauth_token_secret. > > > These is the headers I sent: > > > OAuth oauth_consumer_key="XX", > > oauth_signature_method="HMAC-SHA1", oauth_timestamp="1279738886", > > oauth_nonce="a97ff8b71a313a03a650068e1e6b9bd8f31ad04f", > > oauth_version="1.0", oauth_token="- > > X", oauth_signature="0OFTpLp8o > > %2BL9%2B6o8mkRdBSS8I84%3D" > > > and then I do a GET request > > to:http://api.twitter.com/1/account/verify_credentials.json > > > But all I got is: > > 401 Unauthorized > > Failed to validate oauth signature and token
[twitter-dev] TweetBox on my site
Can someone help me get the tweetbox working on my site please? It will not show up after I click on a link that brings a jQuery pop-up and displays the tweetbox in their, but it won't work. My site is http://lowprogaming.codywd.com Thanks, @Cody_Wilmoth
[twitter-dev] Re: Trying to do a GET after autenticating via OAuth
Ok, I just discovered http://dev.twitter.com/console, I'm matching the composite signing key created by this console and mine and don't match (obviously I'm using the same visible parameter values (timestamp, nonce, oauth_token and consumer key) and my composite signing it's not hte same... On Jul 21, 10:03 pm, clinisbut wrote: > I'm using an OAuth library I've developed in PHP. > > Do I need to pass all the parameters through the query also? > > On Jul 21, 9:25 pm, Taylor Singletary > wrote: > > > Hi there, > > > If you've gotten to the point of retrieving an access token, it's > > likely you managed to get the composite signing key "right" (or your > > library handled it for you) -- as when you're exchanging the request > > token for an access token, you use the oauth_token_secret from the > > request token as part of the signing key. Are you using an OAuth > > library? > > > When you're making a resource request such as one to > > verify_credentials, you'll use the oauth_token_secret you received in > > the access token step as part of the signing key: $consumer_secret + > > "&" + $oauth_token_secret > > > Taylor > > > On Wed, Jul 21, 2010 at 12:13 PM, clinisbut wrote: > > > Hello everybody. > > > > I just achieved to autenticate via OAuth, and I'm trying to get user's > > > data through account/verify_credentials but I think I'm not building > > > correctly the composite signing key or something, mainly because I'm > > > not able to fully understand all the different tokens I receive from > > > Twitter. > > > > After I got my access token, I got: > > > > An oauth_token in the form of: /¿User-ID?/-/letters+numbers/ > > > An oauth_token_secret > > > > Which one I should use to built the composite key? > > > Inhttp://dev.twitter.com/pages/auth > > > they use the first oauth_token getted in the request token, and in the > > > Resource request example they use the oauth_token_secret. > > > > These is the headers I sent: > > > > OAuth oauth_consumer_key="XX", > > > oauth_signature_method="HMAC-SHA1", oauth_timestamp="1279738886", > > > oauth_nonce="a97ff8b71a313a03a650068e1e6b9bd8f31ad04f", > > > oauth_version="1.0", oauth_token="- > > > X", oauth_signature="0OFTpLp8o > > > %2BL9%2B6o8mkRdBSS8I84%3D" > > > > and then I do a GET request > > > to:http://api.twitter.com/1/account/verify_credentials.json > > > > But all I got is: > > > 401 Unauthorized > > > Failed to validate oauth signature and token
Re: [twitter-dev] getStatusesMentions not working today....???
Hi Mark, We aren't seeing any errors like this when we run some tests. Could you elaborate on what the bogus headers are? Matt On Wed, Jul 21, 2010 at 12:51 PM, Mark Krieger wrote: > My application has used getStatusesMentions for many months, it is > only failing when twitter has had some problem, like two days ago, and > in that case, everything is flaky. Today it is failing, but everything > else works fine. Is this a known problem today? getStatusesMentions > always comes back today with bogus headers > > Mark > -- Matt Harris Developer Advocate, Twitter http://twitter.com/themattharris
[twitter-dev] Re: getStatusesMentions not working today....???
Matt, Thanks for the quick response. The call uses EpiTwitter.php, it looks like: Call Oauth to authenticate (this works), then: $val = $twitterObj->get_statusesMentions(array('since_id' => $lastid)); $arr = json_decode($val->responseText, true); if (empty($arr)) { $error = "error text"; log_message(...)} else ... It logs the "error text" showing the response through EpiTwitter was empty. Also, when I print $val->responseText, it is EMPTY. I've tried it on 4 twitter accounts I have, all of which have worked for many months in code which has not changed, it has only failed before when the api was down (like tuesday). And all other api calls which use similar code all work fine. I am stumped. I can send more data, like the $lastid, and my credentials for oauth to you, I would of course do that privately. I will run some more tests from here first I guess. Thanks, Mark On Jul 21, 4:49 pm, Matt Harris wrote: > Hi Mark, > > We aren't seeing any errors like this when we run some tests. Could you > elaborate on what the bogus headers are? > > Matt > > On Wed, Jul 21, 2010 at 12:51 PM, Mark Krieger wrote: > > > My application has used getStatusesMentions for many months, it is > > only failing when twitter has had some problem, like two days ago, and > > in that case, everything is flaky. Today it is failing, but everything > > else works fine. Is this a known problem today? getStatusesMentions > > always comes back today with bogus headers > > > Mark > > -- > > Matt Harris > Developer Advocate, Twitterhttp://twitter.com/themattharris
[twitter-dev] Re: getStatusesMentions not working today....???
Matt, I found the problem, sorry, I believe it is on my end. I found a line of code someone here changed. Argh. I will be more careful with your time in the future. Mark On Jul 21, 6:00 pm, Mark Krieger wrote: > Matt, > > Thanks for the quick response. The call uses EpiTwitter.php, it looks > like: > > Call Oauth to authenticate (this works), then: > > $val = $twitterObj->get_statusesMentions(array('since_id' => > $lastid)); > $arr = json_decode($val->responseText, true); > if (empty($arr)) { $error = "error text"; log_message(...)} > else ... > > It logs the "error text" showing the response through EpiTwitter was > empty. Also, when I print $val->responseText, it is EMPTY. > > I've tried it on 4 twitter accounts I have, all of which have worked > for many months in code which has not changed, it has only failed > before when the api was down (like tuesday). And all other api calls > which use similar code all work fine. I am stumped. > > I can send more data, like the $lastid, and my credentials for oauth > to you, I would of course do that privately. I will run some more > tests from here first I guess. > > Thanks, > > Mark > On Jul 21, 4:49 pm, Matt Harris wrote: > > > Hi Mark, > > > We aren't seeing any errors like this when we run some tests. Could you > > elaborate on what the bogus headers are? > > > Matt > > > On Wed, Jul 21, 2010 at 12:51 PM, Mark Krieger > > wrote: > > > > My application has used getStatusesMentions for many months, it is > > > only failing when twitter has had some problem, like two days ago, and > > > in that case, everything is flaky. Today it is failing, but everything > > > else works fine. Is this a known problem today? getStatusesMentions > > > always comes back today with bogus headers > > > > Mark > > > -- > > > Matt Harris > > Developer Advocate, Twitterhttp://twitter.com/themattharris
Re: [twitter-dev] Re: getStatusesMentions not working today....???
Hey Mark, Not a problem. Glad you found the source of the error. Best, Matt On Wed, Jul 21, 2010 at 3:11 PM, Mark Krieger wrote: > Matt, > > I found the problem, sorry, I believe it is on my end. I found a line > of code someone here changed. Argh. I will be more careful with your > time in the future. > > Mark > > On Jul 21, 6:00 pm, Mark Krieger wrote: > > Matt, > > > > Thanks for the quick response. The call uses EpiTwitter.php, it looks > > like: > > > > Call Oauth to authenticate (this works), then: > > > > $val = $twitterObj->get_statusesMentions(array('since_id' => > > $lastid)); > > $arr = json_decode($val->responseText, true); > > if (empty($arr)) { $error = "error text"; log_message(...)} > > else ... > > > > It logs the "error text" showing the response through EpiTwitter was > > empty. Also, when I print $val->responseText, it is EMPTY. > > > > I've tried it on 4 twitter accounts I have, all of which have worked > > for many months in code which has not changed, it has only failed > > before when the api was down (like tuesday). And all other api calls > > which use similar code all work fine. I am stumped. > > > > I can send more data, like the $lastid, and my credentials for oauth > > to you, I would of course do that privately. I will run some more > > tests from here first I guess. > > > > Thanks, > > > > Mark > > On Jul 21, 4:49 pm, Matt Harris wrote: > > > > > Hi Mark, > > > > > We aren't seeing any errors like this when we run some tests. Could you > > > elaborate on what the bogus headers are? > > > > > Matt > > > > > On Wed, Jul 21, 2010 at 12:51 PM, Mark Krieger >wrote: > > > > > > My application has used getStatusesMentions for many months, it is > > > > only failing when twitter has had some problem, like two days ago, > and > > > > in that case, everything is flaky. Today it is failing, but > everything > > > > else works fine. Is this a known problem today? getStatusesMentions > > > > always comes back today with bogus headers > > > > > > Mark > > > > > -- > > > > > Matt Harris > > > Developer Advocate, Twitterhttp://twitter.com/themattharris > -- Matt Harris Developer Advocate, Twitter http://twitter.com/themattharris
Re: [twitter-dev] Re: Trying to do a GET after autenticating via OAuth
Hi, Know it sounds strange, but I'd stay away from the dev.twitter.com console when trying to debug an issue like this. Even if it weren't buggy, the execution path it uses to perform OAuth operations is a bit different than what you typically would do in your own implementation. Are you married to the idea of using a homebrew OAuth library? Not to dissuade you too much, but there are a number of good libraries in PHP out there both for Twitter and OAuth -- at the very least, I would recommend using one of these as a reference for your own implementation. OAuth is difficult for many even when using well-written libraries.. (See http://dev.twitter.com/pages/oauth_libraries#php and http://dev.twitter.com/pages/libraries#php ) If you are set on writing your own library, I recommend using HTTP header based OAuth (as opposed to attaching OAuth parameters to the query string) -- it keeps your concerns separate, making it much easier to debug when things go wrong. Taylor On Wed, Jul 21, 2010 at 1:39 PM, clinisbut wrote: > Ok, I just discovered http://dev.twitter.com/console, I'm matching the > composite signing key created by this console and mine and don't match > (obviously I'm using the same visible parameter values (timestamp, > nonce, oauth_token and consumer key) and my composite signing it's not > hte same... > > On Jul 21, 10:03 pm, clinisbut wrote: >> I'm using an OAuth library I've developed in PHP. >> >> Do I need to pass all the parameters through the query also? >> >> On Jul 21, 9:25 pm, Taylor Singletary >> wrote: >> >> > Hi there, >> >> > If you've gotten to the point of retrieving an access token, it's >> > likely you managed to get the composite signing key "right" (or your >> > library handled it for you) -- as when you're exchanging the request >> > token for an access token, you use the oauth_token_secret from the >> > request token as part of the signing key. Are you using an OAuth >> > library? >> >> > When you're making a resource request such as one to >> > verify_credentials, you'll use the oauth_token_secret you received in >> > the access token step as part of the signing key: $consumer_secret + >> > "&" + $oauth_token_secret >> >> > Taylor >> >> > On Wed, Jul 21, 2010 at 12:13 PM, clinisbut wrote: >> > > Hello everybody. >> >> > > I just achieved to autenticate via OAuth, and I'm trying to get user's >> > > data through account/verify_credentials but I think I'm not building >> > > correctly the composite signing key or something, mainly because I'm >> > > not able to fully understand all the different tokens I receive from >> > > Twitter. >> >> > > After I got my access token, I got: >> >> > > An oauth_token in the form of: /¿User-ID?/-/letters+numbers/ >> > > An oauth_token_secret >> >> > > Which one I should use to built the composite key? >> > > Inhttp://dev.twitter.com/pages/auth >> > > they use the first oauth_token getted in the request token, and in the >> > > Resource request example they use the oauth_token_secret. >> >> > > These is the headers I sent: >> >> > > OAuth oauth_consumer_key="XX", >> > > oauth_signature_method="HMAC-SHA1", oauth_timestamp="1279738886", >> > > oauth_nonce="a97ff8b71a313a03a650068e1e6b9bd8f31ad04f", >> > > oauth_version="1.0", oauth_token="- >> > > X", oauth_signature="0OFTpLp8o >> > > %2BL9%2B6o8mkRdBSS8I84%3D" >> >> > > and then I do a GET request >> > > to:http://api.twitter.com/1/account/verify_credentials.json >> >> > > But all I got is: >> > > 401 Unauthorized >> > > Failed to validate oauth signature and token >
[twitter-dev] Re: Search within followers / following
does anyone know of a way to search just among the people you are following?
[twitter-dev] Re: Problems with Twitter4J and OAuth on Android
Dooh. I thought I changed that. Thanks. Luckily its a test pair. Clay On Jul 21, 12:13 pm, Taylor Singletary wrote: > Hi Clay, > > Just noticed that you have an API secret in this code sample you've > provided -- you'll want to go to your application record and > regenerate a new key/secret pair. > > As for the code itself -- I see you setting your consumer key and > secret as constants near the top, but then in askOAuth you're using > different values -- is this just a result of a bad paste? > > Taylor > > On Tue, Jul 20, 2010 at 11:18 PM, Clay Graham > wrote: > > Cant figure out if this is a problem with Twitter4J or the Twitter > > API. I am trying to create an OAuth callback activity, started by a > > RequestToken, but the Request Token request is failing. DOES ANYONE > > KNOW IF GOOGLE HAS MADE THE TWITTER CLIENT AVAILABLE BY OPEN SOURCE > > YET? > > > Twitter4J 2.1.2 > > Android Froyo 2.2 > > > package com.sightlyinc.oauth.android; > > > import java.util.Date; > > > import twitter4j.Twitter; > > import twitter4j.TwitterFactory; > > import twitter4j.http.AccessToken; > > import twitter4j.http.RequestToken; > > import android.app.Activity; > > import android.content.Intent; > > import android.content.SharedPreferences; > > import android.content.SharedPreferences.Editor; > > import android.net.Uri; > > import android.os.Bundle; > > import android.preference.PreferenceManager; > > import android.util.Log; > > import android.view.View; > > import android.view.View.OnClickListener; > > import android.widget.Button; > > import android.widget.EditText; > > import android.widget.Toast; > > > public class SightlyOauthActivity extends Activity { > > > private static final String TAG = > > SightlyOauthActivity.class.getName(); > > > private Twitter twitter; > > private RequestToken requestToken; > > private SharedPreferences mSharedPreferences; > > > private String CONSUMER_KEY = "yfKRsmTgi8UT8eHoV5Khrw"; > > private String CALLBACK_URL = "sightlyoauth://oauth"; > > > private EditText tweetTextView; > > private Button buttonLogin; > > > /** Called when the activity is first created. */ > > �...@override > > public void onCreate(Bundle savedInstanceState) { > > super.onCreate(savedInstanceState); > > setContentView(R.layout.main); > > > mSharedPreferences = > > PreferenceManager.getDefaultSharedPreferences( > > getApplicationContext()); > > > tweetTextView = > > (EditText)findViewById(R.id.TweetView); > > buttonLogin = (Button)findViewById(R.id.ButtonLogon); > > buttonLogin.setOnClickListener(new OnClickListener() { > > public void onClick(View v) { > > askOAuth(); > > } > > }); > > > } > > > /** > > * Open the browser and asks the user to authorize the app. > > Afterwards, we > > * redirect the user back here! > > */ > > private void askOAuth() { > > try { > > > //setup properties, https was attempted and I > > was advised to > > //use HTTPS instead. > > > System.setProperty("twitter4j.http.useSSL","false"); > > > System.setProperty("twitter4j.oauth.consumerKey","MYKEY"); > > > System.setProperty("twitter4j.oauth.consumerSecret","MYSECRET"); > > > System.setProperty("twitter4j.oauth.requestTokenURL","http:// > > api.twitter.com/oauth/request_token"); > > > System.setProperty("twitter4j.oauth.accessTokenURL","http:// > > api.twitter.com/oauth/access_token"); > > > System.setProperty("twitter4j.oauth.authorizationURL","http:// > > api.twitter.com/oauth/authorize"); > > > //get the instance > > Twitter twitter = > > new TwitterFactory().getInstance(); > > > //THIS EXCEPTS WITH PERMISSION DENIED > > requestToken = > > twitter.getOAuthRequestToken(CALLBACK_URL); > > > //set the request token info > > Toast.makeText(this, "Please authorize this > > app!", > > Toast.LENGTH_LONG).show(); > > > this.startActivity(new > > Intent(Intent.ACTION_VIEW, Uri > > > > .parse(requestToken.getAuthenticationURL(; > > > } catch (Exception e) { > > Log.e(TAG, e.getMessage(),e); > > Toast.makeText(this, e.getMessage(), > > Toast.LENGTH_LONG).show(); > > } > > } > > > /** > > * As soon as the user successfully authorized the app, we are > > notified > > * here. Now we need to get the verifier from the callback > > URL, > > retrieve > > * token and token_secret and feed them to twitter4j (a
[twitter-dev] Re: Problems with Twitter4J and OAuth on Android
Taylor, So the permission failure is on the request token. Not on the callback, so even though my callback code is a little different it shouldnt matter because it never gets to it. Thanks again for catching that I posted my keys. Clay On Jul 21, 12:13 pm, Taylor Singletary wrote: > Hi Clay, > > Just noticed that you have an API secret in this code sample you've > provided -- you'll want to go to your application record and > regenerate a new key/secret pair. > > As for the code itself -- I see you setting your consumer key and > secret as constants near the top, but then in askOAuth you're using > different values -- is this just a result of a bad paste? > > Taylor > > On Tue, Jul 20, 2010 at 11:18 PM, Clay Graham > wrote: > > Cant figure out if this is a problem with Twitter4J or the Twitter > > API. I am trying to create an OAuth callback activity, started by a > > RequestToken, but the Request Token request is failing. DOES ANYONE > > KNOW IF GOOGLE HAS MADE THE TWITTER CLIENT AVAILABLE BY OPEN SOURCE > > YET? > > > Twitter4J 2.1.2 > > Android Froyo 2.2 > > > package com.sightlyinc.oauth.android; > > > import java.util.Date; > > > import twitter4j.Twitter; > > import twitter4j.TwitterFactory; > > import twitter4j.http.AccessToken; > > import twitter4j.http.RequestToken; > > import android.app.Activity; > > import android.content.Intent; > > import android.content.SharedPreferences; > > import android.content.SharedPreferences.Editor; > > import android.net.Uri; > > import android.os.Bundle; > > import android.preference.PreferenceManager; > > import android.util.Log; > > import android.view.View; > > import android.view.View.OnClickListener; > > import android.widget.Button; > > import android.widget.EditText; > > import android.widget.Toast; > > > public class SightlyOauthActivity extends Activity { > > > private static final String TAG = > > SightlyOauthActivity.class.getName(); > > > private Twitter twitter; > > private RequestToken requestToken; > > private SharedPreferences mSharedPreferences; > > > private String CONSUMER_KEY = "yfKRsmTgi8UT8eHoV5Khrw"; > > private String CALLBACK_URL = "sightlyoauth://oauth"; > > > private EditText tweetTextView; > > private Button buttonLogin; > > > /** Called when the activity is first created. */ > > �...@override > > public void onCreate(Bundle savedInstanceState) { > > super.onCreate(savedInstanceState); > > setContentView(R.layout.main); > > > mSharedPreferences = > > PreferenceManager.getDefaultSharedPreferences( > > getApplicationContext()); > > > tweetTextView = > > (EditText)findViewById(R.id.TweetView); > > buttonLogin = (Button)findViewById(R.id.ButtonLogon); > > buttonLogin.setOnClickListener(new OnClickListener() { > > public void onClick(View v) { > > askOAuth(); > > } > > }); > > > } > > > /** > > * Open the browser and asks the user to authorize the app. > > Afterwards, we > > * redirect the user back here! > > */ > > private void askOAuth() { > > try { > > > //setup properties, https was attempted and I > > was advised to > > //use HTTPS instead. > > > System.setProperty("twitter4j.http.useSSL","false"); > > > System.setProperty("twitter4j.oauth.consumerKey","MYKEY"); > > > System.setProperty("twitter4j.oauth.consumerSecret","MYSECRET"); > > > System.setProperty("twitter4j.oauth.requestTokenURL","http:// > > api.twitter.com/oauth/request_token"); > > > System.setProperty("twitter4j.oauth.accessTokenURL","http:// > > api.twitter.com/oauth/access_token"); > > > System.setProperty("twitter4j.oauth.authorizationURL","http:// > > api.twitter.com/oauth/authorize"); > > > //get the instance > > Twitter twitter = > > new TwitterFactory().getInstance(); > > > //THIS EXCEPTS WITH PERMISSION DENIED > > requestToken = > > twitter.getOAuthRequestToken(CALLBACK_URL); > > > //set the request token info > > Toast.makeText(this, "Please authorize this > > app!", > > Toast.LENGTH_LONG).show(); > > > this.startActivity(new > > Intent(Intent.ACTION_VIEW, Uri > > > > .parse(requestToken.getAuthenticationURL(; > > > } catch (Exception e) { > > Log.e(TAG, e.getMessage(),e); > > Toast.makeText(this, e.getMessage(), > > Toast.LENGTH_LONG).show(); > > } > > } > > > /** > > * As soon as the user successfully authorized the app, we are > >
[twitter-dev] Re: Problems with Twitter4J and OAuth on Android
Ok I know what the problem is! The manifest was blocking connections to the internet because access was not defined. AARRRG! Here is the proper manifest. Hope this helps somebody Sorry http://schemas.android.com/apk/res/android"; package="com.sightlyinc.oauth.android" android:versionCode="1" android:versionName="1.0"> On Jul 21, 12:13 pm, Taylor Singletary wrote: > Hi Clay, > > Just noticed that you have an API secret in this code sample you've > provided -- you'll want to go to your application record and > regenerate a new key/secret pair. > > As for the code itself -- I see you setting your consumer key and > secret as constants near the top, but then in askOAuth you're using > different values -- is this just a result of a bad paste? > > Taylor > > On Tue, Jul 20, 2010 at 11:18 PM, Clay Graham > wrote: > > Cant figure out if this is a problem with Twitter4J or the Twitter > > API. I am trying to create an OAuth callback activity, started by a > > RequestToken, but the Request Token request is failing. DOES ANYONE > > KNOW IF GOOGLE HAS MADE THE TWITTER CLIENT AVAILABLE BY OPEN SOURCE > > YET? > > > Twitter4J 2.1.2 > > Android Froyo 2.2 > > > package com.sightlyinc.oauth.android; > > > import java.util.Date; > > > import twitter4j.Twitter; > > import twitter4j.TwitterFactory; > > import twitter4j.http.AccessToken; > > import twitter4j.http.RequestToken; > > import android.app.Activity; > > import android.content.Intent; > > import android.content.SharedPreferences; > > import android.content.SharedPreferences.Editor; > > import android.net.Uri; > > import android.os.Bundle; > > import android.preference.PreferenceManager; > > import android.util.Log; > > import android.view.View; > > import android.view.View.OnClickListener; > > import android.widget.Button; > > import android.widget.EditText; > > import android.widget.Toast; > > > public class SightlyOauthActivity extends Activity { > > > private static final String TAG = > > SightlyOauthActivity.class.getName(); > > > private Twitter twitter; > > private RequestToken requestToken; > > private SharedPreferences mSharedPreferences; > > > private String CONSUMER_KEY = "yfKRsmTgi8UT8eHoV5Khrw"; > > private String CALLBACK_URL = "sightlyoauth://oauth"; > > > private EditText tweetTextView; > > private Button buttonLogin; > > > /** Called when the activity is first created. */ > > �...@override > > public void onCreate(Bundle savedInstanceState) { > > super.onCreate(savedInstanceState); > > setContentView(R.layout.main); > > > mSharedPreferences = > > PreferenceManager.getDefaultSharedPreferences( > > getApplicationContext()); > > > tweetTextView = > > (EditText)findViewById(R.id.TweetView); > > buttonLogin = (Button)findViewById(R.id.ButtonLogon); > > buttonLogin.setOnClickListener(new OnClickListener() { > > public void onClick(View v) { > > askOAuth(); > > } > > }); > > > } > > > /** > > * Open the browser and asks the user to authorize the app. > > Afterwards, we > > * redirect the user back here! > > */ > > private void askOAuth() { > > try { > > > //setup properties, https was attempted and I > > was advised to > > //use HTTPS instead. > > > System.setProperty("twitter4j.http.useSSL","false"); > > > System.setProperty("twitter4j.oauth.consumerKey","MYKEY"); > > > System.setProperty("twitter4j.oauth.consumerSecret","MYSECRET"); > > > System.setProperty("twitter4j.oauth.requestTokenURL","http:// > > api.twitter.com/oauth/request_token"); > > > System.setProperty("twitter4j.oauth.accessTokenURL","http:// > > api.twitter.com/oauth/access_token"); > > > System.setProperty("twitter4j.oauth.authorizationURL","http:// > > api.twitter.com/oauth/authorize"); > > > //get the instance > > Twitter twitter = > > new TwitterFactory().getInstance(); > > > //THIS EXCEPTS WITH PERMISSION DENIED > > requestToken = > > twitter.getOAuthRequestToken(CALLBACK_URL); > > > //set the request token info > > Toast.makeText(this, "Please authorize this > > app!", > > Toast.LENGTH_LONG).show(); > > > this.startActivity(new > > Intent(Intent.ACTION_VIEW, Uri > > > > .parse(requestToken.getAuthenticat
[twitter-dev] in_reply_to_status_id on statuses/update
Hi statuses/update returns "Incorrect signature" when using in_reply_to_status_id parameter, when the in_reply_to_status_id parameter is omitted the request works fine. Where i must put that param and how? Im doing this call with curl on php. I have added it on my body post and also on my base string, but i cant get it works. Thanks
[twitter-dev] Re: Problems with Twitter4J and OAuth on Android
So does it works completely now with manifest.xml permission in place? What OAuth lib did you use with Twitter4J? On Jul 21, 6:08 pm, Clay Graham wrote: > Ok I know what the problem is! > > The manifest was blocking connections to the internet because access > was not defined. AARRRG! > > Here is the proper manifest. Hope this helps somebody > > Sorry > > > http://schemas.android.com/apk/res/android"; > package="com.sightlyinc.oauth.android" > android:versionCode="1" > android:versionName="1.0"> > > android:label="@string/app_name" > android:launchMode="singleInstance"> > > > android:name="android.intent.category.LAUNCHER" /> > > > > android:name="android.intent.category.DEFAULT" /> > android:name="android.intent.category.BROWSABLE" /> > android:host="oauth" /> > > > > > > > android:name="android.permission.ACCESS_COARSE_LOCATION"/> > android:name="android.permission.ACCESS_FINE_LOCATION"/> > > > > > On Jul 21, 12:13 pm, Taylor Singletary > wrote: > > > Hi Clay, > > > Just noticed that you have an API secret in this code sample you've > > provided -- you'll want to go to your application record and > > regenerate a new key/secret pair. > > > As for the code itself -- I see you setting your consumer key and > > secret as constants near the top, but then in askOAuth you're using > > different values -- is this just a result of a bad paste? > > > Taylor > > > On Tue, Jul 20, 2010 at 11:18 PM, Clay Graham > > wrote: > > > Cant figure out if this is a problem with Twitter4J or the Twitter > > > API. I am trying to create an OAuth callback activity, started by a > > > RequestToken, but the Request Token request is failing. DOES ANYONE > > > KNOW IF GOOGLE HAS MADE THE TWITTER CLIENT AVAILABLE BY OPEN SOURCE > > > YET? > > > > Twitter4J 2.1.2 > > > Android Froyo 2.2 > > > > package com.sightlyinc.oauth.android; > > > > import java.util.Date; > > > > import twitter4j.Twitter; > > > import twitter4j.TwitterFactory; > > > import twitter4j.http.AccessToken; > > > import twitter4j.http.RequestToken; > > > import android.app.Activity; > > > import android.content.Intent; > > > import android.content.SharedPreferences; > > > import android.content.SharedPreferences.Editor; > > > import android.net.Uri; > > > import android.os.Bundle; > > > import android.preference.PreferenceManager; > > > import android.util.Log; > > > import android.view.View; > > > import android.view.View.OnClickListener; > > > import android.widget.Button; > > > import android.widget.EditText; > > > import android.widget.Toast; > > > > public class SightlyOauthActivity extends Activity { > > > > private static final String TAG = > > > SightlyOauthActivity.class.getName(); > > > > private Twitter twitter; > > > private RequestToken requestToken; > > > private SharedPreferences mSharedPreferences; > > > > private String CONSUMER_KEY = "yfKRsmTgi8UT8eHoV5Khrw"; > > > private String CALLBACK_URL = "sightlyoauth://oauth"; > > > > private EditText tweetTextView; > > > private Button buttonLogin; > > > > /** Called when the activity is first created. */ > > > �...@override > > > public void onCreate(Bundle savedInstanceState) { > > > super.onCreate(savedInstanceState); > > > setContentView(R.layout.main); > > > > mSharedPreferences = > > > PreferenceManager.getDefaultSharedPreferences( > > > getApplicationContext()); > > > > tweetTextView = > > > (EditText)findViewById(R.id.TweetView); > > > buttonLogin = (Button)findViewById(R.id.ButtonLogon); > > > buttonLogin.setOnClickListener(new OnClickListener() { > > > public void onClick(View v) { > > > askOAuth(); > > > } > > > }); > > > > } > > > > /** > > > * Open the browser and asks the user to authorize the app. > > > Afterwards, we > > > * redirect the user back here! > > > */ > > > private void askOAuth() { > > > try { > > > > //setup properties, https was attempted and I > > > was advised to > > > //use HTTPS instead. > > > > System.setProperty("twitter4j.http.useSSL","false"); > > > > System.setProperty("twitter4j.oauth.consumerKey","MYKEY"); > > > > System.setProperty("twitter4j.oauth.consumerSecret","MYSECRET"); > > > > System.setProperty("twitter4j.oauth.requestTokenURL","http:// > > > api.twitter.com/oauth/request_token"); > > > > System.setProperty("twitter4j.oauth.accessTokenURL","http:// > > > api.twitter.com/oauth/access_token"); >
[twitter-dev] API Console malfunctioning
method testing:statuses/friends_timeline parameters: max_id console: http://dev.twitter.com/console API Console does not seem to be adding parameters to the request URLs. -http://twitpic.com/27fyo4 Adding the parameter -http://twitpic.com/27fziv The subsequest request The equivalent request in cURL works.
[twitter-dev] Re: Problems Loading Profile Images
Same problem seems to be back - slow/no profile image downloads. On Jul 21, 3:14 pm, Ron wrote: > Not seen it happen at all anymore since corrections were made. > > On Jul 21, 2:08 pm, Taylor Singletary > wrote: > > > Hi Everyone, > > > We had some issues with profile updates and image uploads last week > > and early this week. Some images uploaded in that time period resulted > > in incorrect image URLs, and while this should now be fixed for more > > recently updated/created images, those with avatars saved while in > > this state will likely remain in that state until they re-upload their > > image. > > > What kind of percentages are you seeing in regards to missing/broken images? > > > Taylor > > > On Wed, Jul 21, 2010 at 5:35 AM, luisg wrote: > > > I'm having the same problem too... But just sometimes. > > > Anyway, looks like Twitter is better now... At least is not so slow as > > > was a couple of weeks ago. > > > > On Jul 21, 4:59 am, Ron wrote: > > >> Anyone noticing problems loading profile images (slow, no image > > >> returned, hanging...)? Seems to show up mostly on Public and Search > > >> endpoints.
[twitter-dev] Re: in_reply_to_status_id on statuses/update
i have fixed it. please can you make a more complete documentation? all time we must guest about what must we do. $base_string = "POST&".urlencode(utf8_encode($url))."&in_reply_to_status_id %3D14246241747".urlencode(utf8_encode("&". $access_token."&status=")).myUrlEncode("@aaa ok") and also curl_setopt($curl, CURLOPT_POSTFIELDS, "status=".urlencode("@aaa ok")."&in_reply_to_status_id=14246241747"); On Jul 21, 10:55 pm, ntortarolo wrote: > Hi statuses/update returns "Incorrect signature" when using > in_reply_to_status_id parameter, when the in_reply_to_status_id > parameter is omitted the request works fine. Where i must put that > param and how? > Im doing this call with curl on php. I have added it on my body post > and also on my base string, but i cant get it works. > > Thanks