[twitter-dev] Re: Best way of finding favorites of a user's statuses

2010-11-12 Thread Georgios
Hi Tobias

That's not available via the REST API but available on our site
Favorious
at: http://favorious.com

If you want an API solution, the only way as far as I know is to:

1. Either use Site Streaming API for the users that you want (you get
notified once a tweet of theirs has beenn favorited)

or

2. Use the REST API to get people's favorites and then look which ones
are from users that you are interested in. That's obviously a brute-
force solution but this is what sites like Favorious have been doing.

Cheers
Georgios

Favorious - The best of Twitter, based on favorites.

On Nov 11, 11:16 am, Tobias C. Jensen 2bia...@gmail.com wrote:
 Hi fellow developers.

 I've been looking into finding favorites of a user's statuses.

 It seems that I can only read a favorite count off a status or I can
 view favorites made by a given user.

 What would be the best way to find favorites of a user's statuses -
 returned with the user_id's who favorited them?

 Any suggestions are welcomed! :)

 Kind regards,
 Tobias

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


Re: [twitter-dev] Broken Json Status on Streaming API

2010-11-12 Thread Augusto Santos
In this period of wrong json status, I received either wrong date format of
created_at

2747941206892544   Thu Nov 11 35:42:14 + 2010
2565022072963072   Thw Nov 11 03:35:23 + 2010
256213672896   Tju Nov 11 03:23:54 + 2010
2550619441209344   Thu Nov 11 02:38:0; + 2010
2545567930523648   Vhu Nov 11 02:18:05 + 2010

and so on...

Looks like was only one char problem per status, that mess up everything.

Since Thu Nov 11 15:44:37 + 2010, I get no json parser or corrupt
created_at problem.

Thanks.

On Thu, Nov 11, 2010 at 11:51 PM, Augusto Santos augu...@gemeos.org wrote:

 Hi Taylor,

 First, thanks for the answer.

 I'm using Phirehose lib to PHP, the native json_decode($status,TRUE) from
 PHP and after json decode I'm using mysql_real_escape_string for the string
 fields. I see now that my log routine use mysql escape either before query.
 So this examples are escaped according this mysql procedure.

 Here is the amount of tweets with this problem. That's when json_decode
 didn't work, so there's no id_str or new_id_str in my $status[] array, then
 it's throw an error and log it with the json status. I can send you all
 these status if you want it.

 DateHour(GMT-2)  Count
 2010-11-11 13 97
 2010-11-11 1 367
 2010-11-11 0 521
 2010-11-10 23 598
 2010-11-10 22 569
 2010-11-10 21 577
 2010-11-10 20 619
 2010-11-10 19 606
 2010-11-10 18 603
 2010-11-10 17 607
 2010-11-10 16 247
 2010-11-10 11 9
 2010-11-09 22 2

 Thanks, Augusto.

 On Thu, Nov 11, 2010 at 2:52 PM, Taylor Singletary 
 taylorsinglet...@twitter.com wrote:

 Hi Augusto,

 I monitored the sample stream this morning for a few hours for instances
 similar to the JSON examples you've provided below and was unable to see the
 scenario duplicated. What JSON parser are you using? Is there any other
 processing that may have occurred prior to generating your examples below?
 Do you know how your library is handling escaped quote values like \ ?

 How many of these did you observe?

 Thanks,
 Taylor

 On Thu, Nov 11, 2010 at 5:10 AM, Augusto Santos augu...@gemeos.orgwrote:

 I recevied a lot of broken json status from streaming api

 Count of brojen json by day
 2010-11-09 2
 2010-11-10 4435
 2010-11-11 888

 Examples:
 {in_reply_to_status_id_str:2563309119209472,text:@joi4kitten I
 have that same
 fear.,truncated:false,in_reply_to_user_id_str:16155805,entities:{user_menvions:[{screen_name:joi4kitten,indices:[0,11],name:joi4kitten,id:16155805,id_str:16155805}],urls:[],hashtags:[]},geo:null,in_reply_to_status_id:2563309119209472,place:{country_code:US,country:The
 United States of
 America,bounding_box:{type:Polygon,coordinates:[[[-76.965351,38.971109],[-76.909147,38.971109],[-76.909147,39.022114],[-76.965353,39.022114]]]},place_type:city,attributes:{},full_name:College
 Park, MD,name:College Park,*
 id:e4c17912c815124d.url:http:\/\/api.twitter.com
 \/1\/geo\/id\/e4c17912c815124d.json*},favorited:false,source:\u003Ca
 href=\http:\/\/mobile.twitter.com\ rel=\nofollow\\u003EMobile
 Web\u003C\/a\u003E,contributors:null,in_reply_to_screen_name:joi4kitten,coorfinates:null,retweet_count:null,in_reply_to_user_id:16155805,created_at:Thu
 Nov 11 03:38:52 +
 2010,new_id_str:2565897919139841,new_id:2565897919139841,user:{follow_request_sent:null,lang:en,time_zone:Eastern
 Time (US 
 Canada),screen_name:kellygo,following:null,profile_sidebar_border_color:0A84A5,profile_background_image_url:http:\/\/
 a3.twimg.com\/profile_background_images\/8381831\/twitter_background_with_bear_2.jpg,notifications:null,description:I
 am not Kelly
 Osbourne.,listed_count:12,profile_background_tile:false,profile_background_color:052743,statuses_count:1559,location:College
 Park,
 Md.,show_all_inline_media:false,profile_use_background_image:true,favourites_count:29,profile_text_color:00,contributors_enabled:false,protected:false,geo_enabled:true,created_at:Sun
 Jul 22 02:12:05 + 2007,profile_link_color:0A84A5,name:Kelly
 Osborn,friends_count:235,url:http:\/\/kellygo.blogspot.com
 ,profile_image_url:http:\/\/a1.twimg.com
 \/profile_images\/271727429\/kelly_o__posterized_normal.jpg,id:7632582,id_str:7632582,verified:false,utc_offset:-18000,profile_sidebar_fill_color:CFE9E2,followers_count:332},retweeted:false,id:2565897919139841,id_str:2565897919139841}

 Here there's a dot where should be a comma, between id and url

 {in_reply_to_status_id_str:2546974377119744,text:@ozdj Ah,
 suddenly #TweetBurglar makes complete
 sense,truncated:false,in_reply_to_user_id_str:15324154,entities:{user_mentions:[{screen_name:ozdj,indices:[0,5],name:Derek
 Jenkins,id:15324154,id_str:15324154}],urls:[],hashtags:[{text:TweetBurglar,indices:[19,32]}]},geo:{type:Point,coordinates:[-33.88533896,151.20496326]},in_reply_to_status_id:2546974377119744,place:null,favorited:false,source:\u003Ca
 href=\http:\/\/twitter.com\/\ rel=\nofollow\\u003ETwitter for
 

[twitter-dev] Hat’s off to you and your colleagues

2010-11-12 Thread Dave-twiends
To the twitter team,

I just wanted to drop you guys a quick note to say, great job..! I
follow these groups and it seems that you guys don’t get enough thank
you’s, so thank you..!

I’ve been using the API for over a year now and I can’t tell you how
impressed I am with it. You’ve steadily improved the reliability and
uptime of it, while still adding new functionality. And I know you
have to do this for a system that must have to scale well over 100bn
records now.

I’ve recently been doing some integration work with another large
social networking site, and I can tell you it’s a nightmare. That made
me realized that I’ve been taking for granted what you guys have
achieved with this api.

Well done guys
Hat’s off to you and your colleagues.

Dave
Twiends

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


[twitter-dev] How to maintain session when we are using two twitter Applications

2010-11-12 Thread Sai
Hi,

 I think i will get solution from anyone of you.
 In that project i am working  user need to add twitter account. For
adding twitter account i used a an application. Up to now it is
working fine. Here we an have an option to login using facebook,
google, twitter accounts. When user log in using facebook and google
there is no problem. But when user enter the site using twitter
account problem is occurring. After successful login using twitter ,
session is absolutely fine. But when user is adding an twitter
account, i am getting the response from twitter but after return the
session is destroyed. I am unable to maintain this session. Please
someone give me a solution.

 Here i am using two twitter applications for login and adding new
twitter account. I tried using the same application for both the
process but no use.

Thanks in advance.

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


[twitter-dev] How to embed twitter share inside my page

2010-11-12 Thread bagusflyer
Hello everybody,

I'm a new member of twitter community. What I'm going to do is to put
the twitter share page inside my own page. I'm using iframe for this.
Here is my code:

iframe name=content_frame marginwidth=0 marginheight=0 width=100%
height=100% src=https://twitter.com/home?status=Currently%20reading
%20http://www.hawaiiluaushow.com; frameborder=0/iframe

The problem is the content in this iframe is totally blank. I don't
know why twitter is so special that can't be embedded into my own page
like this. Is there anyway to implement this?

By the way, I tried object embed. It did not work either.

Any suggestion?

Thank you so much,

Bagusflyer

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


[twitter-dev] About Twitter API

2010-11-12 Thread Saurabh
Hello Sir,
I am developing addnewfolloers.com like application. I am not
understanding the way how I will access the information.
I have seen your example.
I will access twitter from my application. In CONSUMER_KEY and
CONSUMER_SECRET, Have I pass my keys or user (whose info i want to
access). Please elaborate me. I want to develope my application soon.
I am a PHP developer. So help me in PHP.

-- 
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] Direct Message Entities

2010-11-12 Thread David W
I'm looking at the http://api.twitter.com/version/direct_messages.json
API and the documentation states that it supports the include_entities
parameter, but no matter what I do I don't seem to get any entity data
back in the response.

I'm testing with the Apigee API Console and using the following
request:
http://api.twitter.com/1/direct_messages.json?include_entities=true

Am I missing a trick, is the documentation wrong, or is there a
problem?

Thanks in advance.

-- 
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] Goodbye list!

2010-11-12 Thread Anton Krasovsky
Guys,

for the last several months I hardly did any work on my app, or any
twitter-related development work for that matter.
I'm going to put the project I was working on ( http://pavo.me a j2me
twitter client ), on hold and unsubscribe from the list.
I can opensource PavoMe, if there is interest (if so, please drop me a line).

Thanks for the support and best of luck to all of you!

Anton

-- 
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] IE9 Add links to this. How they do it?

2010-11-12 Thread Genarg
http://twitter.com/share?ocid=ie9_bow_10A86CC3-0BFD-4FF8-B8E1-309195125FC4url=http://bit.ly/aQqo6ctext=%23IE9

I found a Flash add in a website. The first one thanks me to using
IE9. After I visite another article in the same website and ask me to
share IE9 on twitter.

I click to see what they did and found this link. I didn't find any
docummentation about the ocid part. Should I create it manually if I
want a similar funtionality or there is a tool for that?

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


[twitter-dev] Twitter Button..

2010-11-12 Thread Ace Khor
Hi,
I need someone teach me on how to create a twitter button with
embedded message
inside(because I do not want user to change for the wording) and able
to have a callback function to track on user had tweet for the
message?

I tried @Anywhere API with the tweetBox function, it is do have
callback function, but it is not flexible enough to meet my goal..
Hope somebody can write me some sample code..

Conclusion:
A Tweet button, while click it will pop out a windows which ask for
Authentication with(Allow/Deny button). Once click allow, then the
message will tweet to that particular user's wall.

p/s: The code must be in javascript.

-- 
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] tweet from my website to my own twtter account

2010-11-12 Thread nicarcola
On my website you can place rides I want to tweet this rides
automaticly to my own twitter account. Is there an example of this
function?

-- 
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] Hat’s off to you and your collea gues

2010-11-12 Thread Ryan Sarver
Dave, we really appreciate your note and the kind words. We appreciate all
the time that you guys as developers devote to working on our API, providing
feedback and being an active part of the community. It's great to know that
Taylor, Matt and the rest of the team's hard work pays off sometimes :)

As always, please let us know how we can continue to be better -- both in
code and support.

Thanks again, Ryan

On Fri, Nov 12, 2010 at 4:01 AM, Dave-twiends i...@davesumter.com wrote:

 To the twitter team,

 I just wanted to drop you guys a quick note to say, great job..! I
 follow these groups and it seems that you guys don’t get enough thank
 you’s, so thank you..!

 I’ve been using the API for over a year now and I can’t tell you how
 impressed I am with it. You’ve steadily improved the reliability and
 uptime of it, while still adding new functionality. And I know you
 have to do this for a system that must have to scale well over 100bn
 records now.

 I’ve recently been doing some integration work with another large
 social networking site, and I can tell you it’s a nightmare. That made
 me realized that I’ve been taking for granted what you guys have
 achieved with this api.

 Well done guys
 Hat’s off to you and your colleagues.

 Dave
 Twiends

 --
 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: Streaming Tweets to my own website!!!

2010-11-12 Thread Steven Owens
On Nov 12, 9:12 am, Itsscotty scott.barn...@headroomdesign.co.uk
wrote:
 Hi, I am new to twitter  and one of my clients has requested that he
 would like to stream his tweets on his own website, is this possible?
 Can anyone point me in the correct direction?
 I only know html coding for information.

 I'm a bit new at working with the twitter API, but I think I can
nudge you in the right direction.

 Streaming means something particular in the twitter API world;
there's a streaming API that lets you keep a connection open and
see
tweets in realtime.  However, that requires some significant
programming,
and I suspect you don't really mean, or need, that kind of streaming.

 It's simpler to just use either a bit of php on the server, or a
bit of javascript in in the page, to request the user's tweets from
twitter and display them in the page.  Here are two examples that came
up when I googled on: twitter tweets javascript

http://www.webdesigndev.com/programming/how-to-display-your-last-tweet-using-javascript-and-the-twitter-api

http://tweet.seaofclouds.com/

--
Steven J. Owens
p...@darksleep.com / (412) 401-8060 cell
| I'm going to make broad, sweeping generalizations and strong,
|  declarative statements, because otherwise I'll be here all night
and
|  this document will be four times longer and much less fun to read.
|  Take it all with a grain of salt.
|  - http://darksleep.com/notablog

-- 
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 - Posting in twitter with coldfusion

2010-11-12 Thread Guilherme Luís Silva
After this OAuth is necessary, i can't post anylonger messages with
coldfusion,
i need to authenticate my app

ok, but how do i do this in CF?

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


[twitter-dev] Twitter Feed Randomly Disappears and Reappears

2010-11-12 Thread iluvpinkerton
We recently added a twitter feed to our website and it was working
fine. Then we noticed that every once in while (a few times in the
past couple hours) the tweets in the feed will disappear. A few
minutes later it will be back again. However, I think it's important
to note that when the tweets do not show up it seems as though the
background color is still showing.

www.oscars.org

Can anyone help please?

Thanks,
-Taylor

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


[twitter-dev] Twitter Feed Randomly Disappears and Reappears

2010-11-12 Thread iluvpinkerton
We recently added a twitter feed to our website and it was working
fine. Then we noticed that every once in while (a few times in the
past couple hours) the tweets in the feed will disappear. A few
minutes later it will be back again. However, I think it's important
to note that when the tweets do not show up it seems as though the
background color is still showing.

www.oscars.org

Can anyone help please?

Thanks,
-Taylor

-- 
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] Twitter Feed Randomly Disappears and Reappears

2010-11-12 Thread Taylor Singletary
Hi Taylor,

It looks like you're using a Twitter API widget on oscars.org -- the Twitter
API is rate limited by IP address -- if you're on a network with a lot of
other people (in an office building with a shared external IP address, for
example), often the amount of API calls that can be made to Twitter are
exhausted by all the shared traffic. When I look at oscars.org, the
visibility of the feed is dependent on the IP address I'm accessing from.

One way to mitigate this perspectival issue:
  - Instead of using a pre-packaged Twitter widget, implement the logic
yourself, server-side. You can then control how frequently the feed is
fetched, allowing you to cache results and insure that a fetch is not
required for each page load of your site.

It's likely that the average visitor to your site will not see this issue
express itself.

Thanks,
Taylor

On Fri, Nov 12, 2010 at 2:37 PM, iluvpinkerton iluvpinker...@gmail.comwrote:

 We recently added a twitter feed to our website and it was working
 fine. Then we noticed that every once in while (a few times in the
 past couple hours) the tweets in the feed will disappear. A few
 minutes later it will be back again. However, I think it's important
 to note that when the tweets do not show up it seems as though the
 background color is still showing.

 www.oscars.org

 Can anyone help please?

 Thanks,
 -Taylor

 --
 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: Hat’s off to you and your collea gues

2010-11-12 Thread Jeff Tidwell
I couldn't agree more! Thank you. Thank you.

On Nov 12, 10:46 am, Ryan Sarver rsar...@twitter.com wrote:
 Dave, we really appreciate your note and the kind words. We appreciate all
 the time that you guys as developers devote to working on our API, providing
 feedback and being an active part of the community. It's great to know that
 Taylor, Matt and the rest of the team's hard work pays off sometimes :)

 As always, please let us know how we can continue to be better -- both in
 code and support.

 Thanks again, RyanOn Fri, Nov 12, 2010 at 4:01 AM, Dave-twiends 
 i...@davesumter.com wrote:
  To the twitter team,

  I just wanted to drop you guys a quick note to say, great job..! I
  follow these groups and it seems that you guys don’t get enough thank
  you’s, so thank you..!

  I’ve been using the API for over a year now and I can’t tell you how
  impressed I am with it. You’ve steadily improved the reliability and
  uptime of it, while still adding new functionality. And I know you
  have to do this for a system that must have to scale well over 100bn
  records now.

  I’ve recently been doing some integration work with another large
  social networking site, and I can tell you it’s a nightmare. That made
  me realized that I’ve been taking for granted what you guys have
  achieved with this api.

  Well done guys
  Hat’s off to you and your colleagues.

  Dave
  Twiends

  --
  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: Twitter streaming API using oauth with tracks that have spaces?

2010-11-12 Thread dan
Taylor,

Thanks for your response. The crux might be

 Normalizing spaces to %20, and avoiding + is also a best practice.

tweetstream4j uses Apache's HttpClient 4.0 (see
http://hc.apache.org/httpcomponents-client-ga/index.html). I believe
if a request has application/x-www-form-urlencoded params, HttpClient
URL-encodes (i.e. space = +), and one can't percent-encode beforehand
because the param will be double-encoded, e.g. foo%20bar = foo
%2520bar instead of foo bar. One also can't avoid the HttpClient URL
encoding by using a different type of param, because then the params
are not labeled application/x-www-form-urlencoded.

I wouldn't be surprised if twitter4j and tweepy were in a similar sort
of bind, though I have not verified.

Can you elaborate on why avoiding + is so important? I would hate to
have to patch Apache's HttpClient.

Also, do you know of any Java or Python library that gets this right?


On Nov 10, 8:56 am, Taylor Singletary taylorsinglet...@twitter.com
wrote:
 Think of it this way.. a valid POST body already must contain
 application/x-www-form-urlencoded encoded values for the body to be valid.
 Normalizing spaces to %20, and avoiding + is also a best practice. OAuth
 kicks in after you've already constructed a valid POST body.

 Here's an example of tracking a term with a space character in it: twitter
 api

 == POST Body
 track=twitter%20api

 == signature_base_string
 POSThttp%3A%2F%2Fstream.twitter.com
 %2F1%2Fstatuses%2Ffilter.jsonoauth_consumer_key%3Dri8JxYK2ddwSV5xIUfNNvQ%26oauth_nonce%3DQKWqIP8eEedgOPk5ujopscNxqeoafDNC0r6TZyLFM%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1289400791%26oauth_token%3D819797-torCkTs0XK7H2Y2i1ee5iofqkMC4p7aayeEXRTmlw%26oauth_version%3D1.0%26track%3Dtwitter%2520api

 == Authorization Header
 Authorization: OAuth
 oauth_nonce=QKWqIP8eEedgOPk5ujopscNxqeoafDNC0r6TZyLFM,
 oauth_signature_method=HMAC-SHA1, oauth_timestamp=1289400791,
 oauth_consumer_key=ri8JxYK2ddwSV5xIUfNNvQ,
 oauth_token=819797-torCkTs0XK7H2Y2i1ee5iofqkMC4p7aayeEXRTmlw,
 oauth_signature=jaEvelmcrQOkHdWADBvwZsQeGiQ%3D, oauth_version=1.0

 Taylor

 On Wed, Nov 10, 2010 at 1:38 AM, Ciaran ciar...@gmail.com wrote:
  Try ui-encoding them first, my understanding of the Twitter OAuth
  signature validation is that it is non-standard (although there
  appears to be debate about this) I suspect if you encode them first
  before signing the url it will start to work
  -cj.

  On Tue, Nov 9, 2010 at 6:11 PM, dan dfran...@gmail.com wrote:
   I've been having trouble connecting to the streaming API using oauth
   if my tracks have spaces. I get 401s (unauthorized). In all cases, the
   same code works if the tracks don't have spaces.

   In Java: tried twitter4j (http://twitter4j.org/jira/browse/TFJ-420)
   and tweetstream4j (http://stackoverflow.com/questions/4129622/
   connecting-to-twitter-streaming-api-with-tracks-with-spaces-using-
   apache-httpclie)

   In Python: tried tweepy (https://github.com/joshthecoder/tweepy/
   issues#issue/64)

   The Twitter example using curl (http://dev.twitter.com/pages/
   streaming_api_methods#track) works with tracks that have spaces, but
   it's basic auth.

   I am wondering if some oauth encoding versus POST param encoding is
   not working out.

   Can someone point me to a code example in Java or Python that is known
   to work connecting to the Twitter streaming API using oauth that has
   spaces in its tracks?

   Thanks in advance.

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

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

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


Re: [twitter-dev] Re: Twitter streaming API using oauth with tracks that have spaces?

2010-11-12 Thread Taylor Singletary
The differences between + are %20 are subtle.

When you are using + instead, it *should* still work as long as + is
represented in your signature base string as: %2B

Are you able to see what + yields in your signature base string?

A little background on the difference between + and %20 in URLs...

+ only means space in a URL when in the context of a field name or field
value -- otherwise, within a URL it's literally a plus.. for this reason,
it's a best practice to always be clear with intent. Use + when you mean
plus in a URL component that is not a key/value pair, use %2B when you
literally mean + in a string, and always use %20 when you mean a space
within a string.

Ideally, a web server will consider %20 and + within the context of a URL
value the same -- but this gets complicated by OAuth when calculating
signature verification -- you don't want to be fuzzy on what you consider
is valid or not.

Taylor

On Fri, Nov 12, 2010 at 3:31 PM, dan dfran...@gmail.com wrote:

 By ui-encoding you mean percent-encoding?

 On Nov 10, 3:38 am, Ciaran ciar...@gmail.com wrote:
  Try ui-encoding them first, my understanding of the Twitter OAuth
  signature validation is that it is non-standard (although there
  appears to be debate about this) I suspect if you encode them first
  before signing the url it will start to work
  -cj.
 
  On Tue, Nov 9, 2010 at 6:11 PM, dan dfran...@gmail.com wrote:
   I've been having trouble connecting to the streaming API using oauth
   if my tracks have spaces. I get 401s (unauthorized). In all cases, the
   same code works if the tracks don't have spaces.
 
   In Java: tried twitter4j (http://twitter4j.org/jira/browse/TFJ-420)
   and tweetstream4j (http://stackoverflow.com/questions/4129622/
   connecting-to-twitter-streaming-api-with-tracks-with-spaces-using-
   apache-httpclie)
 
   In Python: tried tweepy (https://github.com/joshthecoder/tweepy/
   issues#issue/64)
 
   The Twitter example using curl (http://dev.twitter.com/pages/
   streaming_api_methods#track) works with tracks that have spaces, but
   it's basic auth.
 
   I am wondering if some oauth encoding versus POST param encoding is
   not working out.
 
   Can someone point me to a code example in Java or Python that is known
   to work connecting to the Twitter streaming API using oauth that has
   spaces in its tracks?
 
   Thanks in advance.
 
   --
   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] Re: Error / lack of clarity in the OAuth documentation regarding the oauth_callback parameter

2010-11-12 Thread Tim Bull
FYI I see the correct flow is documented here:

http://groups.google.com/group/twitter-api-announce/browse_frm/thread/472500cfe9e7cdb9?hl=en

It's just not in the actual formal doco.

Cheers,

Tim

On Nov 13, 4:29 pm, Tim Bull tim.b...@binaryplex.com wrote:
 Hi,

 I'm building a site that integrates with a single Twitter application
 from a series of sub domains under the same main domain.

 In the past I've only ever used a single domain, so never bothered
 with oauth_callback, but I saw it mentioned when I registered the
 application and figured it was exactly what I need, however I
 struggled to implement it for a while.

 After much trial and error, I did further research and seems the
 oauth_callback parameter is to be sent with the REQUEST, not with
 AUTHORISATION.

 If you refer to this documentation on getting a Twitter request token,
 oauth_callback is NOT listed as an allowable parameter.

 http://dev.twitter.com/doc/post/oauth/request_token

 Confusingly oauth_callback IS mentioned here on the authorize step,
 despite it's seeming irrelevance here?

 http://dev.twitter.com/doc/get/oauth/authorize

 This was where I was misled, although it's not clear at all, I
 interpreted this as meaning the oauth_callback should be sent with the
 authorisation step.

 I've now successfully implemented what I want by passing the
 oauth_callback with the request step - seems like an easy fix to
 clarify this in the documentation, it appears to be supported and
 mentioned in several places, just not clearly documented.

 Thanks!

 Tim

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