phpish / shopify_app-skeleton

Skeleton Shopify App project using phpish/shopify
94 stars 41 forks source link

curl exception #38

Closed karthickvalentino closed 7 years ago

karthickvalentino commented 7 years ago

I followed all the steps, but after installing my app I got the following error: phpish\shopify\CurlException: [6] Could not resolve host: admin in /var/www/html/shopify/new_prj/get_products.php on line 15Array ( [method] => GET [uri] => https:/admin/products.json [query] => Array ( [published_status] => published ) [headers] => Array ( [X-Shopify-Access-Token] => [content-type] => application/json; charset=utf-8 ) [payload] => ) Array ( )

My redirect url is get_products.php Can anyone help me.

myjanky commented 7 years ago

You should use ohShopify. It works much better than this one. GET [uri] => https:/admin/products.json
this is wrong. should be dropping in the url of the shop in this.

myjanky commented 7 years ago

also your redirect url should be oauth.php and on line 31 you can do a header() to the get_products.php.

(i know it is a little counterintuitive but you need to get to step 3 in the install process. )

karthickvalentino commented 7 years ago

If I use oauth.php as call back i get "the application cannot be loaded, please check that your browser allows third party cookies". But my browser allows third party cookies.

karthickvalentino commented 7 years ago

I changed if(isset($_GET)) to if(!isset($_GET['code'])) and added a header like you said. Thanks mate.