If we change the server for the application, what do we have to do?


#1

Hi,
Sorry for my poor english, I will try to be understanding…
I have bought a website with an application of twitter.
The server has changed and now, we cannot connect to twitter, why ?
What changes are necessary ?
Is there a form somewhere to give the new adress IP of server ?
Thanks.
Sandy


#2

There are all kinds of reasons you might not be able to connect on your new server, most likely among them is server clock differences. Verify all variables that contribute to successful authorization on your new server: server clock, library versions, SSL support, and so on.


#3

Ok, thank you !
I have an error but I don’t understand what I should do.
Can you help me please ?

Array ( [ “1.0” encoding=“UTF-8”?> Invalid oauth_verifier parameter /oauth/access_token?oauth_consumer_key=AuzwMCySaFTZjeNZFECY8X [amp;oauth_nonce] => d4847d1fabd820ae7d38cb31c5981d6x [amp;oauth_signature] => gJm7KL5SAmzCu/nUHKssbQcpFWX= [amp;oauth_signature_method] => HMAC-SHA1 [amp;oauth_timestamp] => 1313770210 [amp;oauth_token] => VblMh5p9tiVanpjdfmiommooHyMod18rQdrOKZoEqX [amp;oauth_verifier] => VblMh5p9tiVanpjdfmiommooHyMod18rQdrOKZoEqX [amp;oauth_version] => 1.0 )

Thanks !


#4

Something is amiss with your OAuth sequence – this error is speaking pretty specifically to the oauth_verifier being used being wrong for the request. Is there anything different about how you persist session or temporary data in your new servers? Perhaps the oauth_verifier being used in this request has been cached from a previous request (thus making it invalid). You should be receiving a fresh oauth_verifier to correspond with the oauth_token (request token) for every negotiated sequence.


#5

The problem is that I can’t see the application with this pseudo on https://dev.twitter.com/apps so I can’t recuperate a new oauth_verifier :frowning:
Is there another solution ?
Thanks again.


#6

Let me make sure I totally understand what you’re trying to accomplish by clarifying a couple things:

a) if you’re using the access token given to you on dev.twitter.com/apps you already have an access token and don’t need to go to oauth/access_token or care much about oauth_verifier – oauth_verifier is part of the fullOAuth sequence, not the shortcut granted by this feature

b) if you’re trying to negotiate access tokens on behalf of arbitrary users, the sequence goes: 1) you ask for a request token using only your application’s keys & secrets, 2) you take the request token you got in the response and build a URL to oauth/authorize and the end user goes there, 3) user completes flow and is redirected to your site, along with an oauth_token (the request token from step 1) and an oauth_verifier (unique for this sequence) and 5) you send a request to exchange the oauth_token (request token) and oauth_verifier for a new access token which you 6) use in every subsequent request on behalf of that user

Which of these sequences are you trying to solve?


#7

Ok, I try to solve the sequence b)
Do you have ideas ?
Thanks again.


#8

Hi everyone,

I have succeed to connect people on my site to Twitter with the following code :
$to = new TwitterOAuth($consumer_key, $consumer_secret, $_SESSION[‘access_key’], $_SESSION[‘access_secret’]);
$content = $to->get(‘account/verify_credentials’);

Now, I try to do : people can send tweets by my website, but it doesn’t work, I don’t understand why… :frowning:

I have an error when I do a echo $response->error; :
Client must provide a ‘status’ parameter with a value.

Here is my code :
$to = new TwitterOAuth($_SESSION[‘consumer_key’], $_SESSION[‘consumer_secret’], $_SESSION[‘access_key’], $_SESSION[‘access_secret’]);
$response = $to->OAuthRequest(‘https://twitter.com/statuses/update.xml’, array(‘status’ => $message,‘in_reply_to_status_id’ => $in_reply_to_status_id), ‘POST’) ;

I have tried :
$response = $to->post(‘statuses/update’,array(‘status’ => $message,‘in_reply_to_status_id’ => $in_reply_to_status_id)) ;

or

$response = $to->post(‘statuses/update’,array(‘status’ => $message)) ;

but it doesn’t work…

Do you have an idea why ? pleaseeee.

PS : Sessions are working well (for example : $_SESSION[‘consumer_key’], $_SESSION[‘consumer_secret’], $_SESSION[‘access_key’], $_SESSION[‘access_secret’] are not empty)…

Thanks !