PHP file to create a twitter oauth signature.
Budget: £10 – £20 GBP
The Job
I need a PHP file that will allow me to create a twitter signature and all required details using oauth.
i will add the generated signature, nonce and timestamp to my script below.
<?php
$curl = curl_init();
$text = "its from API testing 1234";
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.twitter.com/2/tweets',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"text": "'.$text.'"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: OAuth oauth_consumer_key="APIKEY",oauth_token="ACCESSTOKEN",oauth_signature_method="HMAC-SHA1",oauth_timestamp="TIMESTAMP",oauth_nonce="NONCE",oauth_version="1.0",oauth_signature="SIGNATURE"',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
thanks
max budget £20, need asap please
I need a PHP file that will allow me to create a twitter signature and all required details using oauth.
i will add the generated signature, nonce and timestamp to my script below.
<?php
$curl = curl_init();
$text = "its from API testing 1234";
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.twitter.com/2/tweets',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"text": "'.$text.'"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: OAuth oauth_consumer_key="APIKEY",oauth_token="ACCESSTOKEN",oauth_signature_method="HMAC-SHA1",oauth_timestamp="TIMESTAMP",oauth_nonce="NONCE",oauth_version="1.0",oauth_signature="SIGNATURE"',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
thanks
max budget £20, need asap please