Ben saat son çift için bu bakarak oldum. Ben sorunu googling denedim ve birkaç düzenlemeleri çalıştı ama boşuna ettik. Ben burada her şey doğru olduğundan emin değilim ama ben yine hatalar alıyorum. Kimin twitter OAuth ile çalıştı birisi benim kod bir göz atın ve ne yanlış bakın lütfen.
<?php
$oauth_consumer_key = "OKuMtqCnndfee3sw"; //scrambled
$oauth_consumer_secret = "Gs2hOY9drerfdsfiOF76Yeyf9aTjYzPH5Z3eMU"; // scrambled
$oauth_nonce = sha1(time());
$oauth_signature_method = "HMAC-SHA1";
$oauth_timestamp = time();
$oauth_version = "1.0";
$oauth_token = "50005779-NSp6lP5DVLoWMh34dfdsBb2FnHf9DIcpu"; // scrambled
$token_secret = "ha0tS9SyldDdfeefw"; // scrambled
$status = "testing";
$baseString = "oauth_consumer_key=" . rawurlencode($oauth_consumer_key) . "&oauth_nonce=" . rawurlencode($oauth_nonce) . "&oauth_signature_method=" . rawurlencode($oauth_signature_method) . "&oauth_timestamp=" . rawurlencode($oauth_timestamp) . "&oauth_token=" . rawurlencode($oauth_token) . "&oauth_version=" . rawurlencode($oauth_version) . "&status=" . rawurlencode($status);
$baseString = "POST&" . rawurlencode("https://api.twitter.com/1/statuses/update.json") . "&" . rawurlencode($baseString);
$signing_key = rawurlencode($oauth_consumer_secret) . "&" . rawurlencode($token_secret);
$signature = base64_encode(hash_hmac('sha1', $a, $signing_key, true));
$auth = "OAuth oauth_nonce=\"" . $oauth_nonce . "\",oauth_signature_method=\"" . $oauth_signature_method . "\",oauth_timestamp=\"" . $oauth_timestamp . "\",oauth_consumer_key=\"" . $oauth_consumer_key . "\",oauth_token=\"" . rawurlencode($oauth_token) . "\",oauth_signature=\"" . rawurlencode($signature) ."\",oauth_version=\"" . $oauth_version . "\"";
$ch = curl_init("https://api.twitter.com/1/statuses/update.json");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Expect: ", "Authorization: $auth"));
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $baseString);
$b = curl_exec($ch);
var_dump($b);
curl_close($ch);
?>
Herhangi bir yardım büyük mutluluk duyacağız. Teşekkür ederim.