我使用過淘寶客API的taobao.tbk.item.get, 成功拿到商品資料。但當(dāng)我調(diào)用商品API 的 taobao.product.get, 我拿不到資料,也沒有出現(xiàn)什么錯(cuò)誤。
這是淘寶客API:
<?php
header('Content-Type: text/html; charset=utf-8');
require_once('TopSdk.php');
$c = new TopClient;
$c->appkey = 'appkey ';
$c->secretKey = 'secretKey ';
$req = new TbkItemInfoGetRequest;
$req->setFields("num_iid,title,pict_url,small_images,reserve_price,zk_final_price,user_type,provcity,item_url");
$req->setPlatform("1");
$req->setNumIids("556420459115");
$resp = $c->execute($req);
echo 'title:';
echo $resp->results->n_tbk_item->title.'</br>';
?>
這是商品API 的 taobao.product.get:
<?php
header('Content-Type: text/html; charset=utf-8');
require_once('TopSdk.php');
$c = new TopClient;
$c->appkey = 'appkey ';
$c->secretKey = 'secretKey ';
$req = new ProductGetRequest;
$req->setCustomerProps("20000:優(yōu)衣庫(kù):型號(hào):001:632501:1234");
$req->setFields("product_id,outer_id");
$req->setProductId("556420459115");
$req->setCid("50012286");
$req->setProps("10005:10027;10006:29729");
$req->setMarketId("2");
$resp = $c->execute($req);
?>
如何使用淘寶商品API 的 taobao.product.get?
慕尼黑5688855
2019-03-08 16:08:25