Home > Backend Development > PHP Tutorial > 通过商品ID获取api淘宝客链接不成功,空白

通过商品ID获取api淘宝客链接不成功,空白

WBOY
Release: 2016-06-23 14:05:44
Original
989 people have browsed it

访问这个文件 url.php?goods=14535976817 通过商品id获取对应淘宝客链接,空白,好像没获取数据<?phprequire_once('lib/taobao/TopSdk.php');$pid = pid;$c = new TopClient;$c->appkey = "appkey";$c->secretKey = "secretKey";if(isset($_GET['goods']) && is_numeric($_GET['goods'])){    $req = new TaobaokeItemsConvertRequest;    $req->setFields("click_url,num_iid");    $req->setPid($pid);    $req->setNumIids($_GET['goods']);    $resp = $c->execute($req);    if(isset($resp->taobaoke_items->taobaoke_item->click_url))    {        $url = $resp->taobaoke_items->taobaoke_item->click_url;    }}if(!empty($url)){?><script type="text/javascript">location.href='<?php echo $url;?>';</script><?php}
Copy after login


回复讨论(解决方案)

ItemsConvert api已经切换成组件调用模式 具体的查官方的api文档.

按照官方代码样例都Missing method

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template