[twitter-dev] Re: "Failed to validate oauth signature and token" with xAuth

2010-09-18 Thread Nikolay Klimchuk
You need to URLEndcode password and user name
And then URLEncode entire base string one more time

On Sep 18, 5:55 pm, Tom van der Woerdt  wrote:
> Nikolay,
>
> If you look at the code, you'll see that it's already passed through the URL 
> encode function, but it doesn't do a thing. I'd say that the issue is at that 
> function.
>
> Tom
>
> On Sep 18, 2010, at 11:41 PM, Nikolay Klimchuk  wrote:
>
>
>
> > Second part of the base string:
> > oauth_consumer_key=sGNxxnqgZRHUt6NunK3uw&oauth_nonce=WLxsob
> > j4rhS2xmCbaAeT4aAkRfx4vSHX4OnYpTE77hA&oauth_signature_method=HMAC-
> > SHA1&oauth_timestamp=1276101652&oauth_version=1.0&x_auth_mode=client_auth&x
> > _auth_password=
> > %25&123!aZ+()456242134&x_auth_username=tpFriendlyGiant
>
> > Should be also URLEncoded
>
> > On Sep 18, 7:19 am, mlowicki  wrote:
> >> I tried with data fromhttp://dev.twitter.com/pages/xauth:
>
> >> (function() {
> >> var secret = "5kEQypKe7lFHnufLtsocB1vAzO07xLFgp2Pc4sp2vk&";
> >> var access_token = "oauth_consumer_key=sGNxxnqgZRHUt6NunK3uw" +
> >> "&oauth_nonce=WLxsobj4rhS2xmCbaAeT4aAkRfx4vSHX4OnYpTE77hA" +
> >> "&oauth_signature_method=HMAC-SHA1" +
> >> "&oauth_timestamp=1276101652" +
> >> "&oauth_version=1.0" +
> >> "&x_auth_mode=client_auth" +
> >> "&x_auth_password=%&123!aZ+()456242134" +
> >> "&x_auth_username=tpFriendlyGiant";
> >> var base_string = "POST&" +
> >> encodeURIComponent(
> >> "https://api.twitter.com/oauth/access_token";) + "&" +
> >> encodeURIComponent(access_token);
>
> >> console.debug("base_string", base_string);
> >> console.debug("oauth_signature", b64_hmac_sha1(secret, base_string));
>
> >> })();
>
> >> This is my base_string:
>
> >> POST&https%3A%2F%2Fapi.twitter.com%2Foauth
> >> %2Faccess_token&oauth_consumer_key=sGNxxnqgZRHUt6NunK3uw&oauth_nonce=WLxsob
> >>  j4rhS2xmCbaAeT4aAkRfx4vSHX4OnYpTE77hA&oauth_signature_method=HMAC-
> >> SHA1&oauth_timestamp=1276101652&oauth_version=1.0&x_auth_mode=client_auth&x
> >>  _auth_password=
> >> %25&123!aZ+()456242134&x_auth_username=tpFriendlyGiant
>
> >> This on is from dev.twitter.com
>
> >> POST&https%3A%2F%2Fapi.twitter.com%2Foauth
> >> %2Faccess_token&oauth_consumer_key%3DsGNxxnqgZRHUt6NunK3uw
> >> %26oauth_nonce%3DWLxsobj4rhS2xmCbaAeT4aAkRfx4vSHX4OnYpTE77hA
> >> %26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
> >> %3D1276101652%26oauth_version%3D1.0%26x_auth_mode%3Dclient_auth
> >> %26x_auth_password%3D%2525%2526123%2521aZ%252B
> >> %2528%2529456242134%26x_auth_username%3DtpFriendlyGiant
>
> >> I found the differences in encoding %&123!aZ+() prefix from password
> >> in base_string:
>
> >> From dev.twitter.com/pages/xauth:
>
> >> %2525%2526123%2521aZ%252B%2528%2529
>
> >> From code above:
>
> >> %25%26123!aZ%2B()
>
> >> I use wrong encoding method then and encoding is wrong applied?
>
> >> BR,
> >> Michał Łowicki
>
> > --
> > Twitter developer documentation and resources:http://dev.twitter.com/doc
> > API updates via Twitter:http://twitter.com/twitterapi
> > Issues/Enhancements Tracker:http://code.google.com/p/twitter-api/issues/list
> > Change your membership to this 
> > group:http://groups.google.com/group/twitter-development-talk?hl=en

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


Re: [twitter-dev] Re: "Failed to validate oauth signature and token" with xAuth

2010-09-18 Thread Tom van der Woerdt
Nikolay,

If you look at the code, you'll see that it's already passed through the URL 
encode function, but it doesn't do a thing. I'd say that the issue is at that 
function.

Tom


On Sep 18, 2010, at 11:41 PM, Nikolay Klimchuk  wrote:

> Second part of the base string:
> oauth_consumer_key=sGNxxnqgZRHUt6NunK3uw&oauth_nonce=WLxsob
> j4rhS2xmCbaAeT4aAkRfx4vSHX4OnYpTE77hA&oauth_signature_method=HMAC-
> SHA1&oauth_timestamp=1276101652&oauth_version=1.0&x_auth_mode=client_auth&x
> _auth_password=
> %25&123!aZ+()456242134&x_auth_username=tpFriendlyGiant
> 
> Should be also URLEncoded
> 
> On Sep 18, 7:19 am, mlowicki  wrote:
>> I tried with data fromhttp://dev.twitter.com/pages/xauth:
>> 
>> (function() {
>> var secret = "5kEQypKe7lFHnufLtsocB1vAzO07xLFgp2Pc4sp2vk&";
>> var access_token = "oauth_consumer_key=sGNxxnqgZRHUt6NunK3uw" +
>> "&oauth_nonce=WLxsobj4rhS2xmCbaAeT4aAkRfx4vSHX4OnYpTE77hA" +
>> "&oauth_signature_method=HMAC-SHA1" +
>> "&oauth_timestamp=1276101652" +
>> "&oauth_version=1.0" +
>> "&x_auth_mode=client_auth" +
>> "&x_auth_password=%&123!aZ+()456242134" +
>> "&x_auth_username=tpFriendlyGiant";
>> var base_string = "POST&" +
>> encodeURIComponent(
>> "https://api.twitter.com/oauth/access_token";) + "&" +
>> encodeURIComponent(access_token);
>> 
>> console.debug("base_string", base_string);
>> console.debug("oauth_signature", b64_hmac_sha1(secret, base_string));
>> 
>> })();
>> 
>> This is my base_string:
>> 
>> POST&https%3A%2F%2Fapi.twitter.com%2Foauth
>> %2Faccess_token&oauth_consumer_key=sGNxxnqgZRHUt6NunK3uw&oauth_nonce=WLxsob 
>> j4rhS2xmCbaAeT4aAkRfx4vSHX4OnYpTE77hA&oauth_signature_method=HMAC-
>> SHA1&oauth_timestamp=1276101652&oauth_version=1.0&x_auth_mode=client_auth&x 
>> _auth_password=
>> %25&123!aZ+()456242134&x_auth_username=tpFriendlyGiant
>> 
>> This on is from dev.twitter.com
>> 
>> POST&https%3A%2F%2Fapi.twitter.com%2Foauth
>> %2Faccess_token&oauth_consumer_key%3DsGNxxnqgZRHUt6NunK3uw
>> %26oauth_nonce%3DWLxsobj4rhS2xmCbaAeT4aAkRfx4vSHX4OnYpTE77hA
>> %26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
>> %3D1276101652%26oauth_version%3D1.0%26x_auth_mode%3Dclient_auth
>> %26x_auth_password%3D%2525%2526123%2521aZ%252B
>> %2528%2529456242134%26x_auth_username%3DtpFriendlyGiant
>> 
>> I found the differences in encoding %&123!aZ+() prefix from password
>> in base_string:
>> 
>> From dev.twitter.com/pages/xauth:
>> 
>> %2525%2526123%2521aZ%252B%2528%2529
>> 
>> From code above:
>> 
>> %25%26123!aZ%2B()
>> 
>> I use wrong encoding method then and encoding is wrong applied?
>> 
>> BR,
>> Michał Łowicki
> 
> -- 
> Twitter developer documentation and resources: http://dev.twitter.com/doc
> API updates via Twitter: http://twitter.com/twitterapi
> Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
> Change your membership to this group: 
> http://groups.google.com/group/twitter-development-talk?hl=en

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


[twitter-dev] Re: "Failed to validate oauth signature and token" with xAuth

2010-09-18 Thread Nikolay Klimchuk
Second part of the base string:
oauth_consumer_key=sGNxxnqgZRHUt6NunK3uw&oauth_nonce=WLxsob
j4rhS2xmCbaAeT4aAkRfx4vSHX4OnYpTE77hA&oauth_signature_method=HMAC-
SHA1&oauth_timestamp=1276101652&oauth_version=1.0&x_auth_mode=client_auth&x
_auth_password=
%25&123!aZ+()456242134&x_auth_username=tpFriendlyGiant

Should be also URLEncoded

On Sep 18, 7:19 am, mlowicki  wrote:
> I tried with data fromhttp://dev.twitter.com/pages/xauth:
>
> (function() {
> var secret = "5kEQypKe7lFHnufLtsocB1vAzO07xLFgp2Pc4sp2vk&";
> var access_token = "oauth_consumer_key=sGNxxnqgZRHUt6NunK3uw" +
> "&oauth_nonce=WLxsobj4rhS2xmCbaAeT4aAkRfx4vSHX4OnYpTE77hA" +
> "&oauth_signature_method=HMAC-SHA1" +
> "&oauth_timestamp=1276101652" +
> "&oauth_version=1.0" +
> "&x_auth_mode=client_auth" +
> "&x_auth_password=%&123!aZ+()456242134" +
> "&x_auth_username=tpFriendlyGiant";
> var base_string = "POST&" +
> encodeURIComponent(
> "https://api.twitter.com/oauth/access_token";) + "&" +
> encodeURIComponent(access_token);
>
> console.debug("base_string", base_string);
> console.debug("oauth_signature", b64_hmac_sha1(secret, base_string));
>
> })();
>
> This is my base_string:
>
> POST&https%3A%2F%2Fapi.twitter.com%2Foauth
> %2Faccess_token&oauth_consumer_key=sGNxxnqgZRHUt6NunK3uw&oauth_nonce=WLxsob 
> j4rhS2xmCbaAeT4aAkRfx4vSHX4OnYpTE77hA&oauth_signature_method=HMAC-
> SHA1&oauth_timestamp=1276101652&oauth_version=1.0&x_auth_mode=client_auth&x 
> _auth_password=
> %25&123!aZ+()456242134&x_auth_username=tpFriendlyGiant
>
> This on is from dev.twitter.com
>
> POST&https%3A%2F%2Fapi.twitter.com%2Foauth
> %2Faccess_token&oauth_consumer_key%3DsGNxxnqgZRHUt6NunK3uw
> %26oauth_nonce%3DWLxsobj4rhS2xmCbaAeT4aAkRfx4vSHX4OnYpTE77hA
> %26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
> %3D1276101652%26oauth_version%3D1.0%26x_auth_mode%3Dclient_auth
> %26x_auth_password%3D%2525%2526123%2521aZ%252B
> %2528%2529456242134%26x_auth_username%3DtpFriendlyGiant
>
> I found the differences in encoding %&123!aZ+() prefix from password
> in base_string:
>
> From dev.twitter.com/pages/xauth:
>
> %2525%2526123%2521aZ%252B%2528%2529
>
> From code above:
>
> %25%26123!aZ%2B()
>
> I use wrong encoding method then and encoding is wrong applied?
>
> BR,
> Michał Łowicki

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


Re: [twitter-dev] Tracking twitter trends

2010-09-18 Thread Tom van der Woerdt
http://dev.twitter.com/doc/get/trends

Tom


On 9/18/10 6:56 PM, Praveen wrote:
> Hi everyone,
> 
> I am an iPhone app developer and I am wanting to track twitter trends
> on a topic for my app.
> 
> Can you please let me know if this is possible?
> 
> Praveen
> 

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


[twitter-dev] Tracking twitter trends

2010-09-18 Thread Praveen
Hi everyone,

I am an iPhone app developer and I am wanting to track twitter trends
on a topic for my app.

Can you please let me know if this is possible?

Praveen

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


Re: [twitter-dev] Newbie so sorry if this is basic

2010-09-18 Thread Tom van der Woerdt
Twitter doesn't provide a way to check the language of a tweet. You can
easily check the location of the user, but that wouldn't be accurate.
The best way is to ask the Google Translate API to detect the language,
but that would take time. A different way to solve it is to simply check
for common english words.

Tom


On 9/18/10 4:26 PM, steveh000 wrote:
> I am learning all about java and the Twitter api for my second year at
> Uni, I have created a stream where I am getting everything sent to me
> in every language i can think off. is there a way of filtering it to
> just English.
> 
> If someone could point me in the right direction that would help me
> loads.
> 
> Thanks in advance
> 
> Steve
> 

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


[twitter-dev] Re: Need inputs to implement Twitter app using xAuth

2010-09-18 Thread Hitesh
Hi All,
I was successfully managed to implement twitter xAuth permissions
using Java. I have used Twitter4J package for it. Also i have posted
the code snippets on http://www.hiteshagrawal.com/java/
twitter-xauth-permission-using-java">Twiiter xAuth Permission in Java

On Jul 28, 2:29 pm, Sambath Chandran  wrote:
> All,
> I am implementing an application to receive and the latest tweet from the
> twitter. After refering to twitter website, I concluded to use xAuth
> authentication for my development.
>
> Can anybody let me know is there any ready to use java library for xAuth?
>
> Basially I want to know to how to make xAuth work with Java.
>
> Thanks,
> Sambath

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


[twitter-dev] Twitter xAuth using Java

2010-09-18 Thread Hitesh
I was successfully managed to implement twitter xAuth permissions
using Java. I have used Twitter4J package for it. Also i have posted
the code snippets on http://www.hiteshagrawal.com/java/
twitter-xauth-permission-using-java">Twiiter xAuth Permission in Java

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


[twitter-dev] Newbie so sorry if this is basic

2010-09-18 Thread steveh000
I am learning all about java and the Twitter api for my second year at
Uni, I have created a stream where I am getting everything sent to me
in every language i can think off. is there a way of filtering it to
just English.

If someone could point me in the right direction that would help me
loads.

Thanks in advance

Steve

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


Re: [twitter-dev] Re: Twitter client to get updates

2010-09-18 Thread John Kalucki
It sounds like you should make a REST call to fetch the mentions when you
render the page.

-John


On Sat, Sep 18, 2010 at 12:54 AM, ram  wrote:

> I would like to show the consumers his notifications (  tweets of
> people he follows )  when he logs in to our portal.
>
> Is there a Daemon client available already; in Perl or Java
> preferably.
> I am pretty new to any API access on twitter.
>
> Also apparently from the dev.twitter site there are no restrictions on
> number of notifications / followings etc for API access.
> But how does twitter make sure they wont run out of resources by
> giving unlimited service.
>
>
>
>
>
> On Sep 17, 9:30 pm, John Kalucki  wrote:
> > Look into the User Streams endpoint on the Streaming API if you are
> building
> > a desktop notification service. If you are building a centralized
> service,
> > you'll want Site Streams.
> >
> > -John Kaluckihttp://twitter.com/jkalucki
> > Twitter, Inc.
> >
> > On Fri, Sep 17, 2010 at 7:41 AM, ram  wrote:
> > > I want to write a twitter notification client.
> > >  When anyone who I follow tweets I need to get a notification so that
> > > I can go and fetch the tweeted message.
> >
> > > Is this possible and allowed ?
> >
> > > Thanks
> > > Ram
> >
> > > --
> > > Twitter developer documentation and resources:
> http://dev.twitter.com/doc
> > > API updates via Twitter:http://twitter.com/twitterapi
> > > Issues/Enhancements Tracker:
> > >http://code.google.com/p/twitter-api/issues/list
> > > Change your membership to this group:
> > >http://groups.google.com/group/twitter-development-talk?hl=en
>
> --
> Twitter developer documentation and resources: http://dev.twitter.com/doc
> API updates via Twitter: http://twitter.com/twitterapi
> Issues/Enhancements Tracker:
> http://code.google.com/p/twitter-api/issues/list
> Change your membership to this group:
> http://groups.google.com/group/twitter-development-talk?hl=en
>

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


Re: [twitter-dev] Re: "Failed to validate oauth signature and token" with xAuth

2010-09-18 Thread Tom van der Woerdt
Hi,

You can verify your Base String using my OAuth Validator,


To answer your question: it *looks* like your encodeURIComponent
function doesn't do its work properly.

Tom


On 9/18/10 1:19 PM, mlowicki wrote:
> I tried with data from http://dev.twitter.com/pages/xauth:
> 
> (function() {
> var secret = "5kEQypKe7lFHnufLtsocB1vAzO07xLFgp2Pc4sp2vk&";
> var access_token = "oauth_consumer_key=sGNxxnqgZRHUt6NunK3uw" +
> "&oauth_nonce=WLxsobj4rhS2xmCbaAeT4aAkRfx4vSHX4OnYpTE77hA" +
> "&oauth_signature_method=HMAC-SHA1" +
> "&oauth_timestamp=1276101652" +
> "&oauth_version=1.0" +
> "&x_auth_mode=client_auth" +
> "&x_auth_password=%&123!aZ+()456242134" +
> "&x_auth_username=tpFriendlyGiant";
> var base_string = "POST&" +
> encodeURIComponent(
> "https://api.twitter.com/oauth/access_token";) + "&" +
> encodeURIComponent(access_token);
> 
> console.debug("base_string", base_string);
> console.debug("oauth_signature", b64_hmac_sha1(secret, base_string));
> })();
> 
> 
> This is my base_string:
> 
> POST&https%3A%2F%2Fapi.twitter.com%2Foauth
> %2Faccess_token&oauth_consumer_key=sGNxxnqgZRHUt6NunK3uw&oauth_nonce=WLxsobj4rhS2xmCbaAeT4aAkRfx4vSHX4OnYpTE77hA&oauth_signature_method=HMAC-
> SHA1&oauth_timestamp=1276101652&oauth_version=1.0&x_auth_mode=client_auth&x_auth_password=
> %25&123!aZ+()456242134&x_auth_username=tpFriendlyGiant
> 
> This on is from dev.twitter.com
> 
> POST&https%3A%2F%2Fapi.twitter.com%2Foauth
> %2Faccess_token&oauth_consumer_key%3DsGNxxnqgZRHUt6NunK3uw
> %26oauth_nonce%3DWLxsobj4rhS2xmCbaAeT4aAkRfx4vSHX4OnYpTE77hA
> %26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
> %3D1276101652%26oauth_version%3D1.0%26x_auth_mode%3Dclient_auth
> %26x_auth_password%3D%2525%2526123%2521aZ%252B
> %2528%2529456242134%26x_auth_username%3DtpFriendlyGiant
> 
> 
> I found the differences in encoding %&123!aZ+() prefix from password
> in base_string:
> 
> From dev.twitter.com/pages/xauth:
> 
> %2525%2526123%2521aZ%252B%2528%2529
> 
> From code above:
> 
> %25%26123!aZ%2B()
> 
> I use wrong encoding method then and encoding is wrong applied?
> 
> BR,
> Michał Łowicki
> 

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


[twitter-dev] Re: "Failed to validate oauth signature and token" with xAuth

2010-09-18 Thread mlowicki
I tried with data from http://dev.twitter.com/pages/xauth:

(function() {
var secret = "5kEQypKe7lFHnufLtsocB1vAzO07xLFgp2Pc4sp2vk&";
var access_token = "oauth_consumer_key=sGNxxnqgZRHUt6NunK3uw" +
"&oauth_nonce=WLxsobj4rhS2xmCbaAeT4aAkRfx4vSHX4OnYpTE77hA" +
"&oauth_signature_method=HMAC-SHA1" +
"&oauth_timestamp=1276101652" +
"&oauth_version=1.0" +
"&x_auth_mode=client_auth" +
"&x_auth_password=%&123!aZ+()456242134" +
"&x_auth_username=tpFriendlyGiant";
var base_string = "POST&" +
encodeURIComponent(
"https://api.twitter.com/oauth/access_token";) + "&" +
encodeURIComponent(access_token);

console.debug("base_string", base_string);
console.debug("oauth_signature", b64_hmac_sha1(secret, base_string));
})();


This is my base_string:

POST&https%3A%2F%2Fapi.twitter.com%2Foauth
%2Faccess_token&oauth_consumer_key=sGNxxnqgZRHUt6NunK3uw&oauth_nonce=WLxsobj4rhS2xmCbaAeT4aAkRfx4vSHX4OnYpTE77hA&oauth_signature_method=HMAC-
SHA1&oauth_timestamp=1276101652&oauth_version=1.0&x_auth_mode=client_auth&x_auth_password=
%25&123!aZ+()456242134&x_auth_username=tpFriendlyGiant

This on is from dev.twitter.com

POST&https%3A%2F%2Fapi.twitter.com%2Foauth
%2Faccess_token&oauth_consumer_key%3DsGNxxnqgZRHUt6NunK3uw
%26oauth_nonce%3DWLxsobj4rhS2xmCbaAeT4aAkRfx4vSHX4OnYpTE77hA
%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
%3D1276101652%26oauth_version%3D1.0%26x_auth_mode%3Dclient_auth
%26x_auth_password%3D%2525%2526123%2521aZ%252B
%2528%2529456242134%26x_auth_username%3DtpFriendlyGiant


I found the differences in encoding %&123!aZ+() prefix from password
in base_string:

>From dev.twitter.com/pages/xauth:

%2525%2526123%2521aZ%252B%2528%2529

>From code above:

%25%26123!aZ%2B()

I use wrong encoding method then and encoding is wrong applied?

BR,
Michał Łowicki

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


[twitter-dev] Re: API doesn't respond to my status update request. JS - XmlHTTPRequest.

2010-09-18 Thread Kakysha
Yes, of course. The oAuth library - is the most (the only one :)) )
popular library for JS -  http://oauth.googlecode.com/svn/code/javascript/
from John Kristian. It was adviced on oauth.net

The accessor.serviceProvider.actionURL is "http://api.twitter.com/1/
statuses/update.json"

If you need - this are my request headers : 
https://www.dropbox.com/s/1s4e6u1s8p84yq4/z.png

It seems like twitter forces to close the connection ((

On Sep 17, 6:31 pm, Taylor Singletary 
wrote:
> Hi there,
>
> What's the value of accessor.serviceProvider.actionURL when you're trying to
> update status? I'm not familiar with the OAuth library used here, can you
> tell me more about it?
>
> Thanks,
> Taylor
>
>
>
> On Fri, Sep 17, 2010 at 3:32 AM, Kakysha  wrote:
> > I use XmlHTTPRequest in JavaScript (actually, i write Google Chrome
> > Extension)
> > Api successfully gives me all the tokens (i use oAuth OOB) the twitter
> > returns me a PIN code, then it successfully changed to acces token,
> > and on the final stage - attemp to update status it doesnt return any
> > response (((
> > I try to send Authorization header (i think, all right with it), and i
> > try to send authorization fields directly in POST body, but nothing ((
>
> > My code is :
>
> > message = {method: "post", action: accessor.serviceProvider.actionURL,
> > parameters: [["status","Yahoo"]]};
> > var requestBody = OAuth.formEncode(message.parameters);
> > OAuth.completeRequest(message,
> > { consumerKey   : accessor.consumerKey
> > , consumerSecret: accessor.consumerSecret
> > , token         : token
> > , tokenSecret   : token_secret
> > });
> > var authorizationHeader = OAuth.getAuthorizationHeader("",
> > message.parameters);
> > var requestAction = new XMLHttpRequest();
> > requestAction.onreadystatechange = function() {
> > if (requestAction.readyState == 4) {
> > alert(requestAction.status+" "+requestAction.statusText
> >  +"\n"+requestAction.getAllResponseHeaders()
> >  +"\n"+requestAction.responseText);
> > }
> > };
> > requestAction.open(message.method, message.action, true);
> > requestAction.setRequestHeader("Authorization", authorizationHeader);
> > requestAction.setRequestHeader("Content-Type", "application/x-www-form-
> > urlencoded");
> > requestAction.send(requestBody);
>
> > --
> > Twitter developer documentation and resources:http://dev.twitter.com/doc
> > API updates via Twitter:http://twitter.com/twitterapi
> > Issues/Enhancements Tracker:
> >http://code.google.com/p/twitter-api/issues/list
> > Change your membership to this group:
> >http://groups.google.com/group/twitter-development-talk?hl=en

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


Re: [twitter-dev] Error posting "_" to twitter using statuses/update

2010-09-18 Thread Tom van der Woerdt
Just checked your Base String in my OAuth Base String Validator
(), you apparently use too much URL
encoding on the status= part of the Base String. If I replace the %255F
with %5F, it doesn't give an error. ;-) (Don't ask me why. It just does)

Tom


On 9/18/10 2:28 AM, Elsa wrote:
> I got a question about sending "_" to twitter. It is working fine if I
> post it from twitter site but when I use statuses/update to post a
> status with "_", twitter is returning a failure. Posting other
> characters (e.g. "^" shown below) are fine using exactly the same
> code. I've attached the success and failure cases with the base
> strings used below. Please advice. Thanks!
> 
> Case1
> =
> Status String: ^
> Base String: POST&https%3A%2F%2Fapi.twitter.com%2F1%2Fstatuses
> %2Fupdate.xml&oauth_consumer_key%3Dxx%26oauth_nonce%3D###
> %26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
> %3D1284670556%26oauth_token%3Dyy%26oauth_version%3D1.0%26status
> %3D%255E%255E%255E%255E%255E
> Rseult: Success
> 
> http: -> Send header [requestId=15] (438 bytes): POST /1/statuses/
> update.xml HTTP/1.1
> Host: api.twitter.com
> Accept: */*
> Authorization: OAuth oauth_nonce="###
> %",oauth_signature_method="HMAC-
> SHA1",oauth_timestamp="1284670556",oauth_consumer_key="xx",oauth_token="yy",oauth_signature="zz",oauth_version="1.0"
> Content-Length: 22
> Content-Type: application/x-www-form-urlencoded
> 
> Send data: status=%5E%5E%5E%5E%5E
> 
> HTTP/1.1 200 OK
> Date: Thu, 16 Sep 2010 20:55:57 GMT
> Server: hi
> Status: 200 OK
> X-Transaction: ##
> ETag: "##"
> Last-Modified: Thu, 16 Sep 2010 20:55:57 GMT
> X-Runtime: 0.12452
> Content-Type: application/xml; charset=utf-8
> Content-Length: 2214
> Pragma: no-cache
> X-Revision: DEV
> Expires: Tue, 31 Mar 1981 05:00:00 GMT
> Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-
> check=0
> Set-Cookie: k=xxx.xxx.xxx.xx.xx; path=/; expires=Thu, 23-
> Sep-10 20:55:57 GMT; domain=.twitter.com
> Set-Cookie: guest_id=##; path=/; expires=Sat, 16 Oct 2010 20:55:57
> GMT
> Set-Cookie: lang=en; path=/
> Set-Cookie: _twitter_sess=##; domain=.twitter.com; path=/
> Vary: Accept-Encoding
> Connection: close
> 
> 
> Thu Sep 16 20:55:57 + 2010
> ##
> ^
> .
> 
> Case2
> =
> Status String: _
> POST&https%3A%2F%2Fapi.twitter.com%2F1%2Fstatuses
> %2Fupdate.xml&oauth_consumer_key%3Dxx%26oauth_nonce%3D###
> %26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
> %3D1284670570%26oauth_token%3Dyy%26oauth_version%3D1.0%26status
> %3D%255F%255F%255F%255F%255F
> Result: Fail
> 
> http: -> Send header [requestId=16] (441 bytes): POST /1/statuses/
> update.xml HTTP/1.1
> Host: api.twitter.com
> Accept: */*
> Authorization: OAuth oauth_nonce="###
> %",oauth_signature_method="HMAC-
> SHA1",oauth_timestamp="1284670570",oauth_consumer_key="xx",oauth_token="yy",oauth_signature="zz",oauth_version="1.0"
> Content-Length: 22
> Content-Type: application/x-www-form-urlencoded
> 
> Send data: status=%5F%5F%5F%5F%5F
> 
> HTTP/1.1 401 Unauthorized
> Date: Thu, 16 Sep 2010 20:56:11 GMT
> Server: hi
> Status: 401 Unauthorized
> WWW-Authenticate: Basic realm="Twitter API"
> Content-Type: application/xml; charset=utf-8
> Content-Length: 135
> Cache-Control: no-cache, max-age=1800
> Set-Cookie: k=xxx.xxx.xxx.xx.xx; path=/; expires=Thu, 23-
> Sep-10 20:56:11 GMT; domain=.twitter.com
> Set-Cookie: guest_id=##; path=/; expires=Sat, 16 Oct 2010 20:56:11
> GMT
> Set-Cookie: _twitter_sess=##; domain=.twitter.com; path=/
> Expires: Thu, 16 Sep 2010 21:26:11 GMT
> Vary: Accept-Encoding
> Connection: close
> 
> 
> /1/statuses/update.xml
> Incorrect signature
> 
> 

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


[twitter-dev] Re: Twitter client to get updates

2010-09-18 Thread ram
I would like to show the consumers his notifications (  tweets of
people he follows )  when he logs in to our portal.

Is there a Daemon client available already; in Perl or Java
preferably.
I am pretty new to any API access on twitter.

Also apparently from the dev.twitter site there are no restrictions on
number of notifications / followings etc for API access.
But how does twitter make sure they wont run out of resources by
giving unlimited service.





On Sep 17, 9:30 pm, John Kalucki  wrote:
> Look into the User Streams endpoint on the Streaming API if you are building
> a desktop notification service. If you are building a centralized service,
> you'll want Site Streams.
>
> -John Kaluckihttp://twitter.com/jkalucki
> Twitter, Inc.
>
> On Fri, Sep 17, 2010 at 7:41 AM, ram  wrote:
> > I want to write a twitter notification client.
> >  When anyone who I follow tweets I need to get a notification so that
> > I can go and fetch the tweeted message.
>
> > Is this possible and allowed ?
>
> > Thanks
> > Ram
>
> > --
> > Twitter developer documentation and resources:http://dev.twitter.com/doc
> > API updates via Twitter:http://twitter.com/twitterapi
> > Issues/Enhancements Tracker:
> >http://code.google.com/p/twitter-api/issues/list
> > Change your membership to this group:
> >http://groups.google.com/group/twitter-development-talk?hl=en

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