When using "GET account/verify_credentials" - What parameters need to be passed in?


#1

I am working on a PHP library for handling some limited interaction with Twitter. I already have everything working up to getting an access token and secret (I’m getting the user_id/screen_name so I know that’s working). So now I have this token and token_secret and I want to verify that they are still working.

The documentation page doesn’t really say what I have to send, so I assume it’s just the normal OAuth authentication headers. Here’s an example of what that all looks like:

[type] => GET
[url] => http://api.twitter.com/1/account/verify_credentials.json
[params] => Array
    (
        [oauth_consumer_key] => xxxEvaxxxxx6qGaxxxxxx
        [oauth_nonce] => 41905dd8277ad538aa3b4cb574d1a471
        [oauth_signature_method] => HMAC-SHA1
        [oauth_timestamp] => 1311202675
        [oauth_token] => xxxxxxxx-5AxxxxG1GxxxxxxbhsxxxnXxxxxMxxx
        [oauth_version] => 1.0
        [oauth_signature] => xxxxxNKRYxxxxxxxG9Y=
    )

[headers] => Array
    (
        [0] => Authorization: OAuth oauth_consumer_key="xxxEvaxxxxx6qGaxxxxxx", oauth_nonce="41905dd8277ad538aa3b4cb574d1a471", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1311202675", oauth_token="xxxxxxxx-5AxxxxG1GxxxxxxbhsxxxnXxxxxMxxx", oauth_version="1.0", oauth_signature="xxxxxNKRYxxxxxxxG9Y="
        [1] => Content-Length:
        [2] => Expect:
    )

Problem is… when I send that all I get back is:

[error] => Could not authenticate with OAuth.
[request] => /1/account/verify_credentials.json

What am I doing wrong?


#2

Never mind. Solved. I was making the curl request send as POST. The conflict broke everything. After removing that setopt everything works.


#3

Hello,

Can you please provide me full Request with Header and Parameters for Twitter Authorization.

Thankx in advance


#4

Hi,

we have a problem to show our tweets on our Facebook page, any help please!

Thanks,
Abdallah


#5

I have problem with authentication.help me.


#6

l have problem with authentication.help.me