[twitter-dev] Twitter XAuth issues

2010-12-16 Thread JG
Hi

I have been attempting to implement Twitter using XAuth in an upcoming
PS3 title but I am having a lot of issues with authentication, roughly
90% of my requests fail with 401 : Failed to validate oauth signature
and token. I have already ruled out the usual suspect of dodgy
timestamp and retry using the timestamp provided in the response
headers. I have also had no issues generating matching signatures
using the test data in the Twitter XAuth documentation. Any help on
the matter would be most welcome.

Thanks
Jason


Post body:
 
x_auth_mode=client_authx_auth_password=Xx_auth_username=XX

Authorisation header params:
 
oauth_consumer_key=Xoauth_nonce=MTYyOTkxMDE4MDcxNDc5OTMwNDEyNDM0MzExNTY2NjExODQ3OTQ3oauth_signature_method=HMAC-
SHA1oauth_timestamp=1292503073oauth_version=1.0x_auth_mode=client_authx_auth_password=Xx_auth_username=XX

URL encoded authorisation header params: oauth_consumer_key
%3DX%26oauth_nonce
%3DMTYyOTkxMDE4MDcxNDc5OTMwNDEyNDM0MzExNTY2NjExODQ3OTQ3%26oauth_signature_method
%3DHMAC-SHA1%26oauth_timestamp%3D1292503073%26oauth_version
%3D1.0%26x_auth_mode%3Dclient_auth%26x_auth_password%3DX
%26x_auth_username%3DXX

Signature base string:
POSThttps%3A%2F%2Fapi.twitter.com%2Foauth
%2Faccess_tokenoauth_consumer_key%3DX
%26oauth_nonce
%3DMTYyOTkxMDE4MDcxNDc5OTMwNDEyNDM0MzExNTY2NjExODQ3OTQ3%26oauth_signature_method
%3DHMAC-SHA1%26oauth_timestamp%3D1292503073%26oauth_version
%3D1.0%26x_auth_mode%3Dclient_auth%26x_auth_password%3DX
%26x_auth_username%3DXX

Signature key:
X

oAuth signature:
yyUGFCB4zTWHXyb73422Qgxqbgw=

URL encoded oauth signature:
yyUGFCB4zTWHXyb73422Qgxqbgw%3D

Authorisation header:
OAuth
oauth_nonce=MTYyOTkxMDE4MDcxNDc5OTMwNDEyNDM0MzExNTY2NjExODQ3OTQ3,
oauth_signature_method=HMAC-SHA1, oauth_timestamp=1292503073,
oauth_consumer_key=X,
oauth_signature=yyUGFCB4zTWHXyb73422Qgxqbgw%3D, oauth_version=1.0

Post body:
x_auth_username=XXx_auth_password=Xx_auth_mode=client_auth

-- 
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 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 a href=http://www.hiteshagrawal.com/java/
twitter-xauth-permission-using-javaTwiiter xAuth Permission in Java/
a

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

2010-09-17 Thread Khanh Nguyen
Hi all,

I sent the request to get approvals from Twitter for using xAuth, and
Twitter has approved.
But I still got error as below:

=
m2010-09-17 16:43:25.317 me360[2189:207] m_authenticateRequest =
4FE4401C-6976-4FA7-8957-6CB684F980AC
2010-09-17 16:43:29.349 me360[2189:207] Twitter request failed!
(4FE4401C-6976-4FA7-8957-6CB684F980AC) Error: Operation could not be
completed. (HTTP error 401.) ((null))
=

In code, I did as follow:
twitterEngine = [[MGTwitterEngine alloc] initWithDelegate:self];
[twitterEngine setConsumerKey:myConsumerKey secret:MyConsumerSecret];
[twitterEngine getXAuthAccessTokenForUsername:_username
password:_password];

But I got failed. And the access token could not be reached in this
delegate:
(void)accessTokenReceived:(OAToken *)token forRequest:(NSString
*)connectionIdentifier

Did I miss something or steps? I tried many times but seem I could not
resolve this issue.
Can you give me idea? or example?

Many thanks
Khanh

-- 
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] Twitter xauth login for posting and receiving Tweets

2010-09-15 Thread Ernandes Jr.
Your code looks OK! Either your problem is related to your keys our your
environment. Have you tryied to run you code on a real device?

On Wed, Sep 15, 2010 at 6:30 AM, vinod mopuruvinodre...@gmail.com wrote:

 Hi,
 Hi,

 I imported the libraries:

 xauth-encoders.jar
 kxml2-min-2.3.0.jar,
 mobile-ju-framework-1.0.jar
 twitter_api_me-1.3.jar


 After using Ernandes library i am receiving errors as below
 I used single access token here
 verification of credentials are successfull. but failed to Tweet and
 received below errors

 In WTK 3.0
 javax.microedition.io.ConnectionNotFoundException: ConnectionNotFound
 error in socket::open : error = 10060

 In WTK 2.5.2
 java.lang.SecurityException: Invalid / expired Token

 Source is as follows:

 Token token = new Token(token_access, token_secret);
 Credential c = new Credential(rahulka...@gmail.com,
 8oHIBK7T90Ye7GjIF6SToA,
 4Ebm4f7bie2AAYyN75DxwSUYeg8x0SBlL0IyKIXzaw, token);
 UserAccountManager m = UserAccountManager.getInstance(c);
 try {
 if (m.verifyCredential()) {
 System.out.println(Consumer or token keys are success);
 Tweet t = new Tweet(Hi!!! This is my first tweet via Twitter API
 ME.);
 TweetER ter = TweetER.getInstance(m);
 t = ter.post(t);

 } else {
 System.out.println(Consumer or token keys are invalid!);
 }
 } catch (Exception ex) {
 System.out.println(Exception here1=+ex);
 }

 If i use normal credentials my application is not able to validate
 credentials itself

 In WTK 3.0

 javax.microedition.io.ConnectionNotFoundException: ConnectionNotFound
 error in socket::open : error = 10060

 In WTK 2.5.2

 Credentials unsucessfull

 Also when i am not able to import Equifax cert
 Please help to authentication, post and receive tweets using my
 application.

 Regards,
 Basu

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




-- 
Ernandes Jr.
-
ALL programs are poems. However,
NOT all programmers are poets.

-- 
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] Twitter xauth login for posting and receiving Tweets

2010-09-15 Thread Zahid Naqvi
did you get the xAuth permissions from the twitter?


--

*Thanks  Regards*

*Zahid Naqvi | Senior Software Engineer*
--
*
G1-11, I.T.Park, M.I.A. (Extn.) Udaipur - 313003 Rajasthan India
(M) *+91-9799966000* | (R) *+91-141-2608333*
*zahidalina...@gmail.com | za...@arcgate.com





On Thu, Sep 16, 2010 at 1:02 AM, Ernandes Jr. ernan...@gmail.com wrote:

 Your code looks OK! Either your problem is related to your keys our your
 environment. Have you tryied to run you code on a real device?


 On Wed, Sep 15, 2010 at 6:30 AM, vinod mopuruvinodre...@gmail.com wrote:

 Hi,
 Hi,

 I imported the libraries:

 xauth-encoders.jar
 kxml2-min-2.3.0.jar,
 mobile-ju-framework-1.0.jar
 twitter_api_me-1.3.jar


 After using Ernandes library i am receiving errors as below
 I used single access token here
 verification of credentials are successfull. but failed to Tweet and
 received below errors

 In WTK 3.0
 javax.microedition.io.ConnectionNotFoundException: ConnectionNotFound
 error in socket::open : error = 10060

 In WTK 2.5.2
 java.lang.SecurityException: Invalid / expired Token

 Source is as follows:

 Token token = new Token(token_access, token_secret);
 Credential c = new Credential(rahulka...@gmail.com,
 8oHIBK7T90Ye7GjIF6SToA,
 4Ebm4f7bie2AAYyN75DxwSUYeg8x0SBlL0IyKIXzaw, token);
 UserAccountManager m = UserAccountManager.getInstance(c);
 try {
 if (m.verifyCredential()) {
 System.out.println(Consumer or token keys are success);
 Tweet t = new Tweet(Hi!!! This is my first tweet via Twitter API
 ME.);
 TweetER ter = TweetER.getInstance(m);
 t = ter.post(t);

 } else {
 System.out.println(Consumer or token keys are invalid!);
 }
 } catch (Exception ex) {
 System.out.println(Exception here1=+ex);
 }

 If i use normal credentials my application is not able to validate
 credentials itself

 In WTK 3.0

 javax.microedition.io.ConnectionNotFoundException: ConnectionNotFound
 error in socket::open : error = 10060

 In WTK 2.5.2

 Credentials unsucessfull

 Also when i am not able to import Equifax cert
 Please help to authentication, post and receive tweets using my
 application.

 Regards,
 Basu

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




 --
 Ernandes Jr.
 -
 ALL programs are poems. However,
 NOT all programmers are poets.

  --
 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] Twitter - XAuth

2010-09-07 Thread Georgooty varghese
Dear Twitter,

I have used XAuth authentication used for my application. I have implemented
twitter client in C# on 1 month ago , Now these days I got gateway error
first time logging. Next time logging no pblm. I have no changed in code
side. If any updation in XAuth authentication mechanism. In my application i
couldn't post a tweet in malayalam/arabi language. How to solve this issue.

Any body please help me.

Regards,
George

-- 
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] Twitter - XAuth

2010-09-07 Thread Tom van der Woerdt
On 9/7/10 9:11 AM, Georgooty varghese wrote:
 Dear Twitter,
  
 I have used XAuth authentication used for my application. I have
 implemented twitter client in C# on 1 month ago , Now these days I got
 gateway error first time logging.
Just write some code to handle 500 errors - they happen a lot. It's
usually not a client issue.

 Next time logging no pblm. I have no
 changed in code side. If any updation in XAuth authentication mechanism.
 In my application i couldn't post a tweet in malayalam/arabi language.
 How to solve this issue.
Sounds like you aren't URL encoding the values properly.

 Any body please help me.
  
 Regards,
 George
  
 
 -- 
 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] Twitter - XAuth

2010-09-07 Thread Georgooty varghese
Hi,
Thanks for your reply. How to handle 500 error.  I have post a tweet into
twitter in  english  using my twitter client.But I couldn't be able to post
a tweet in malayalam/arabi. Could u please explain me, how to encode url for
that.
Regards,
George

On Tue, Sep 7, 2010 at 2:31 PM, Tom van der Woerdt i...@tvdw.eu wrote:

 On 9/7/10 9:11 AM, Georgooty varghese wrote:
  Dear Twitter,
 
  I have used XAuth authentication used for my application. I have
  implemented twitter client in C# on 1 month ago , Now these days I got
  gateway error first time logging.
 Just write some code to handle 500 errors - they happen a lot. It's
 usually not a client issue.

  Next time logging no pblm. I have no
  changed in code side. If any updation in XAuth authentication mechanism.
  In my application i couldn't post a tweet in malayalam/arabi language.
  How to solve this issue.
 Sounds like you aren't URL encoding the values properly.

  Any body please help me.
 
  Regards,
  George
 
 
  --
  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] Twitter - XAuth

2010-09-07 Thread Taylor Singletary
Hi Georgooty,

Present an example the status update you are trying to send with the
UTF-8 characters, and I'll show you how it should be encoded.

There's also a reference you can take a look at that iterates nearly
every single possible UTF-8 character and how they should be encoded
for a status update to Twitter at
http://github.com/episod/oauth-utf8-character-map

Taylor

On Tue, Sep 7, 2010 at 2:17 AM, Georgooty varghese georgo...@gmail.com wrote:
 Hi,
 Thanks for your reply. How to handle 500 error.  I have post a tweet into
 twitter in  english  using my twitter client.But I couldn't be able to post
 a tweet in malayalam/arabi. Could u please explain me, how to encode url for
 that.
 Regards,
 George

 On Tue, Sep 7, 2010 at 2:31 PM, Tom van der Woerdt i...@tvdw.eu wrote:

 On 9/7/10 9:11 AM, Georgooty varghese wrote:
  Dear Twitter,
 
  I have used XAuth authentication used for my application. I have
  implemented twitter client in C# on 1 month ago , Now these days I got
  gateway error first time logging.
 Just write some code to handle 500 errors - they happen a lot. It's
 usually not a client issue.

  Next time logging no pblm. I have no
  changed in code side. If any updation in XAuth authentication mechanism.
  In my application i couldn't post a tweet in malayalam/arabi language.
  How to solve this issue.
 Sounds like you aren't URL encoding the values properly.

  Any body please help me.
 
  Regards,
  George
 
 
  --
  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


-- 
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 with Chilkat Hail Mary - Internal Server Error (500)

2010-05-12 Thread Peter Cross
Greetings,

Can anyone spot what I'm doing wrong here?  I've been busting my head
on it for way too many hours.  Any help much appreciated!

-ZPC

=
HTTP Requirements:

* You are using POST

* You are using SSL

* Your xAuth parameters are the ONLY parameters in your POST body

* You're setting a Content-Type header of application/x-www-form-
urlencoded

* You're using HTTP header-based OAuth -- not attaching OAuth
parameters to the URL or POST body

* You're HTTP Authorization header should only have oauth parameters
in it, not any of the xauth parameters





=
My Pseudo Code:

Dim objRequest as new chilkatHttpRequest
Dim objResponse as chilkatHttpResponse

Dim sUrl as string
Dim sPost as string
Dim sAuthorize as string

sUrl = https://api.twitter.com/oauth/access_token

sAuthorize = OAuth oauth_consumer_key=WITNI0aegpKoIYX7altq3A,
oauth_nonce=TCHRFIGDJS403105000810185, oauth_signature_method=HMAC-
SHA1, oauth_timestamp=1273680007,

oauth_version=1.0, oauth_signature=rY9qTi1o4Ew+/6rS4248VY81i9M=

objRequest.UsePost
objRequest.AddHeader Authorization, sAuthorize

sPost =
x_auth_mode=client_authx_auth_password=XXXx_auth_username=XXX
objRequest.LoadBodyFromString sPost, utf-8

TRIED BOTH OF THESE:



Set objResponse = m_objHttp.PostUrlEncoded(sUrl, objRequest)



sDomain = m_objHttp.GetDomain(sUrl)
objRequest.Path = m_objHttp.GetUrlPath(sUrl)
Set objResponse = m_objHttp.SynchronousRequest(sDomain, 443, 1,
objRequest)




=
This is what I get back from the Chilkat HTTP Event Log:

SocketConnect = api.twitter.com:443
HostnameResolve = api.twitter.com
ResolvedToIp = 168.143.161.29
SocketConnected = api.twitter.com:443
SslHandshake = Starting
SslHandshake = Finished
HttpRequestBegin = POST,api.twitter.com:443/oauth/access_token
RequestHeader = POST /oauth/access_token HTTP/1.1
Authorization: OAuth oauth_consumer_key=WITNI0aegpKoIYX7altq3A,
oauth_nonce=TCHRFIGDJS403105000810185, oauth_signature_method=HMAC-
SHA1, oauth_timestamp=1273680007,

oauth_version=1.0, oauth_signature=rY9qTi1o4Ew+/6rS4248VY81i9M=
Host: api.twitter.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 0
StartSendingRequest = 370
PercentDone = 100
HttpInfo = Begin reading response
ResponseHeader = HTTP/1.1 500 Internal Server Error
Date: Wed, 12 May 2010 16:29:06 GMT
Server: hi
Status: 500 Internal Server Error
X-Transaction: 1273681746-82104-13101
Last-Modified: Wed, 12 May 2010 16:29:06 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 4659
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=76.109.171.34.1273681744410025;
  path=/; expires=Wed, 19-May-10 16:29:04 GMT;
  domain=.twitter.com
Set-Cookie: guest_id=127368174665612036;
  path=/; expires=Fri, 11 Jun 2010 16:29:06 GMT
Set-Cookie:
_twitter_sess=BAh7CToPY3JlYXRlZF9hdGwrCOAaWY0oAToRdHJhbnNfcHJvbXB0MDoHaWQi
%250AJTA1NWE5MjEzZDQyODNmMWIyZDkwYTA2ZmM2ZWU5OGVhIgpmbGFzaElDOidB

%250AY3Rpb25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--32c34802010f03dfd32dafd5977de62874d7b166;
  domain=.twitter.com; path=/
Vary: Accept-Encoding
Connection: close
HttpStatusCode = 500
ResponseContentLength = 4659
ResponseContentLength = 4659
PercentDone = 42
HttpInfo = Connection:close header is present
HttpInfo = Finished reading response
PercentDone = 100

###