Shopify oauth returns false while trying to fetch the access token using curl in PHP -


i'm facing same problem like: [https://stackoverflow.com/questions/32516932/shopify-oauth-returns-false-while-trying-to-fetch-the-access-token-using-curl][1]

it returns false. used proper client_id, secrect_id, , code,

code sample:

$post = [   'client_id' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',   'client_secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',   'code'   =>  'xxxxxxxxxxxxxxxxxxxx' ];  $ch = curl_init();  curl_setopt($ch,     curlopt_url,"https://dummy.myshopify.com/admin/oauth/access_token"); curl_setopt($ch, curlopt_post, 1); curl_setopt($ch, curlopt_postfields,$post); curl_setopt($ch, curlopt_returntransfer, true);  $response = curl_exec($ch); curl_close($ch); var_dump($response); 

please give answer if knowing problem.

find solution. $post should array array("client_id"=>$client_id,"client_secret"=>$client_secret,"code"=>$code);

and working me.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -