$shopify = shopify\client( $shop, $app_settings->api_key, $shop_data->access_token, false );
$products = $shopify('GET', '/admin/products.json', array('published_status' => 'published'));`
我通过打印$ shopify获得以下回复:
Closure Object
(
[static] => Array
(
[base_uri] => https://4f4b14c3eb5464ae238dd6cf4b88bce6:c2608b7067c5bf96028876023114b68c@pilibaba.myshopify.com/
[oauth_token] => c2608b7067c5bf96028876023114b68c
[private_app] => 2f996f1bd2a0f4fb343703555c89a234
)
[parameter] => Array
(
[$method_uri] =>
[$query] =>
[$payload] =>
[&$response_headers] =>
[$request_headers] =>
[$curl_opts] =>
)
)
访问$ product后我收到以下错误。
致命错误:
未被捕获的phpish \ shopify \ CurlException:[3]在第67行的/******/shopify_app/shopify.php第36行的/*****/shopify_app/shopify_app.php格式错误
我的访问令牌有问题吗?因为我在安装应用程序时拥有所有商店许可。
我没有从shopify支持团队那里找到任何帮助,因此对此错误进行了研究。
答案 0 :(得分:3)
更改网址的密钥:
apikey = c2608b7067c5bf96028876023114b68c
access_token = 4f4b14c3eb5464ae238dd6cf4b88bce6
https://c2608b7067c5bf96028876023114b68c:4f4b14c3eb5464ae238dd6cf4b88bce6@pilibaba.myshopify.com/admin/shop.json