Note that there are some explanatory texts on larger screens.

plurals
  1. POtwitter api tmhOAuth is not working oauth/access_token
    primarykey
    data
    text
    <p>I am trying to develop a twitter application using php and tmhOAuth </p> <p>I am using this code to get access token . This code is working in my testing server but not in the production server. php configuration of two server is almost same. </p> <pre><code>if(isset($_REQUEST['oauth_verifier'])) { $tmhOAuth-&gt;config['user_token'] = $_SESSION['oauth']['oauth_token']; $tmhOAuth-&gt;config['user_secret'] = $_SESSION['oauth']['oauth_token_secret']; $code = $tmhOAuth-&gt;request('POST', $tmhOAuth-&gt;url('oauth/access_token', ''), array( 'oauth_verifier' =&gt; $_REQUEST['oauth_verifier'] )); if ($code == 200) { $_SESSION['access_token'] = $tmhOAuth-&gt;extract_params($tmhOAuth-&gt;response['response']); unset($_SESSION['oauth']); header("Location: {$here}"); } else { outputError($tmhOAuth); } } </code></pre> <p>I am getting empty response from twitter [response] => . </p> <p>At least I should get an error message. Please can anybody tell me what's wrong?</p> <pre><code>tmhOAuth Object ( [params] =&gt; Array ( ) [headers] =&gt; Array ( [Authorization] =&gt; OAuth oauth_consumer_key="htxmSKEwkd5jPB6z1bQI6Q", oauth_nonce="adb19fb2bc5f76060b63bcbb1b3e2b94", oauth_signature="E5Vb62A00L8Nj8uyt9MRKdFk6ck%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1329438683", oauth_token="g3ekXAg9SwoYIge2l1E6JGwIQ02QYiha8uz5TMVA", oauth_verifier="vOrM6QWwGRpTEWgE2Kk2Y87DL1mlx324r4wh2SsUo", oauth_version="1.0" [Content-Type] =&gt; [Content-Length] =&gt; [Expect] =&gt; ) [auto_fixed_time] =&gt; [buffer] =&gt; [config] =&gt; Array ( [user_agent] =&gt; tmhOAuth 0.61+SSL - //github.com/themattharris/tmhOAuth [use_ssl] =&gt; 1 [host] =&gt; api.twitter.com [consumer_key] =&gt; htxmSKEwkd5jPB6z1bQI6Q [consumer_secret] =&gt; fmNsDdu809uAARz0EslIL5Tj9m3XxLuaTVg6RSVnAQ [user_token] =&gt; g3ekXAg9SwoYIge2l1E6JGwIQ02QYiha8uz5TMVA [user_secret] =&gt; 4K8chxSWwwQ5nk1HSQrrbNW23FIGWiNLMycoqqxUV0 [force_nonce] =&gt; [nonce] =&gt; adb19fb2bc5f76060b63bcbb1b3e2b94 [force_timestamp] =&gt; [timestamp] =&gt; 1329438683 [oauth_version] =&gt; 1.0 [oauth_signature_method] =&gt; HMAC-SHA1 [curl_connecttimeout] =&gt; 30 [curl_timeout] =&gt; 10 [curl_ssl_verifyhost] =&gt; 2 [curl_ssl_verifypeer] =&gt; 1 [curl_cainfo] =&gt; /home/content/00/6684400/html/html-tweetcomments/to/cacert.pem [curl_capath] =&gt; /home/content/00/6684400/html/html-tweetcomments/to [curl_followlocation] =&gt; [curl_proxy] =&gt; [curl_proxyuserpwd] =&gt; [curl_encoding] =&gt; [is_streaming] =&gt; [streaming_eol] =&gt; [streaming_metrics_interval] =&gt; 60 [as_header] =&gt; 1 [debug] =&gt; [multipart] =&gt; ) [method] =&gt; POST [url] =&gt; https://api.twitter.com/oauth/access_token [signing_params] =&gt; oauth_consumer_key=htxmSKEwkd5jPB6z1bQI6Q&amp;oauth_nonce=adb19fb2bc5f76060b63bcbb1b3e2b94&amp;oauth_signature_method=HMAC-SHA1&amp;oauth_timestamp=1329438683&amp;oauth_token=g3ekXAg9SwoYIge2l1E6JGwIQ02QYiha8uz5TMVA&amp;oauth_verifier=vOrM6QWwGRpTEWgE2Kk2Y87DL1mlx324r4wh2SsUo&amp;oauth_version=1.0 [auth_params] =&gt; Array ( [oauth_consumer_key] =&gt; htxmSKEwkd5jPB6z1bQI6Q [oauth_nonce] =&gt; adb19fb2bc5f76060b63bcbb1b3e2b94 [oauth_signature] =&gt; E5Vb62A00L8Nj8uyt9MRKdFk6ck%3D [oauth_signature_method] =&gt; HMAC-SHA1 [oauth_timestamp] =&gt; 1329438683 [oauth_token] =&gt; g3ekXAg9SwoYIge2l1E6JGwIQ02QYiha8uz5TMVA [oauth_verifier] =&gt; vOrM6QWwGRpTEWgE2Kk2Y87DL1mlx324r4wh2SsUo [oauth_version] =&gt; 1.0 ) [request_params] =&gt; Array ( ) [base_string] =&gt; POST&amp;https%3A%2F%2Fapi.twitter.com%2Foauth%2Faccess_token&amp;oauth_consumer_key%3DhtxmSKEwkd5jPB6z1bQI6Q%26oauth_nonce%3Dadb19fb2bc5f76060b63bcbb1b3e2b94%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1329438683%26oauth_token%3Dg3ekXAg9SwoYIge2l1E6JGwIQ02QYiha8uz5TMVA%26oauth_verifier%3DvOrM6QWwGRpTEWgE2Kk2Y87DL1mlx324r4wh2SsUo%26oauth_version%3D1.0 [signing_key] =&gt; fmNsDdu809uAARz0EslIL5Tj9m3XxLuaTVg6RSVnAQ&amp;4K8chxSWwwQ5nk1HSQrrbNW23FIGWiNLMycoqqxUV0 [auth_header] =&gt; OAuth oauth_consumer_key="htxmSKEwkd5jPB6z1bQI6Q", oauth_nonce="adb19fb2bc5f76060b63bcbb1b3e2b94", oauth_signature="E5Vb62A00L8Nj8uyt9MRKdFk6ck%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1329438683", oauth_token="g3ekXAg9SwoYIge2l1E6JGwIQ02QYiha8uz5TMVA", oauth_verifier="vOrM6QWwGRpTEWgE2Kk2Y87DL1mlx324r4wh2SsUo", oauth_version="1.0" [response] =&gt; Array ( [headers] =&gt; Array ( [date] =&gt; Fri, 17 Feb 2012 00:31:23 GMT [status] =&gt; 401 Unauthorized [x_mid] =&gt; 1195d712f355657dc7944ba32517310a873d29e1 [x_revision] =&gt; DEV [x_runtime] =&gt; 0.01222 [x_transaction] =&gt; c84c1b7c659ad830 [cache_control] =&gt; no-cache, no-store, must-revalidate, pre-check=0, post-check=0 [x_frame_options] =&gt; SAMEORIGIN [expires] =&gt; Tue, 31 Mar 1981 05:00:00 GMT [content_type] =&gt; text/html; charset=utf-8 [last_modified] =&gt; Fri, 17 Feb 2012 00:31:23 GMT [pragma] =&gt; no-cache [set_cookie] =&gt; _twitter_sess=BAh7CDoPY3JlYXRlZF9hdGwrCN1yuIg1ASIKZmxhc2hJQzonQWN0aW9uQ29u%250AdHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7ADoHaWQiJWEz%250AMDBiNmY2YmVhODIxZjVlOGMzZjRiODYyMTMzOWRh--d554d0fb6e5d23c9c9a8a10bd72c968c5872ff88; domain=.twitter.com; path=/; HttpOnly [vary] =&gt; Accept-Encoding [content_encoding] =&gt; gzip [content_length] =&gt; 21 [server] =&gt; tfe ) [code] =&gt; 401 [response] =&gt; [info] =&gt; Array ( [url] =&gt; https://api.twitter.com/oauth/access_token [content_type] =&gt; text/html; charset=utf-8 [http_code] =&gt; 401 [header_size] =&gt; 1047 [request_size] =&gt; 541 [filetime] =&gt; -1 [ssl_verify_result] =&gt; 0 [redirect_count] =&gt; 0 [total_time] =&gt; 0.52167 [namelookup_time] =&gt; 3.3E-5 [connect_time] =&gt; 0.119133 [pretransfer_time] =&gt; 0.380061 [size_upload] =&gt; 0 [size_download] =&gt; 21 [speed_download] =&gt; 40 [speed_upload] =&gt; 0 [download_content_length] =&gt; 21 [upload_content_length] =&gt; -1 [starttransfer_time] =&gt; 0.521456 [redirect_time] =&gt; 0 [request_header] =&gt; POST /oauth/access_token HTTP/1.1 User-Agent: tmhOAuth 0.61+SSL - //github.com/themattharris/tmhOAuth Host: api.twitter.com Accept: */* Accept-Encoding: deflate, gzip Authorization: OAuth oauth_consumer_key="htxmSKEwkd5jPB6z1bQI6Q", oauth_nonce="adb19fb2bc5f76060b63bcbb1b3e2b94", oauth_signature="E5Vb62A00L8Nj8uyt9MRKdFk6ck%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1329438683", oauth_token="g3ekXAg9SwoYIge2l1E6JGwIQ02QYiha8uz5TMVA", oauth_verifier="vOrM6QWwGRpTEWgE2Kk2Y87DL1mlx324r4wh2SsUo", oauth_version="1.0" ) [error] =&gt; [errno] =&gt; 0 ) ) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload