Table of Contents
回复讨论(解决方案)
Home Backend Development PHP Tutorial 使用淘宝api,如何根据店铺id或者掌柜id获取店铺内的热销产品

使用淘宝api,如何根据店铺id或者掌柜id获取店铺内的热销产品

Jun 23, 2016 pm 02:18 PM

RT。
最好可以根据销量排序


回复讨论(解决方案)

要想通过 api 还要根据店铺id 来取得店铺的热销产品 是没有办法的。

唯一的办法就是采集

谢谢lz。
这段代码,是写来批量获取商品的,怎么不管用呢
include "TopSdk.php";
$c = new TopClient;
$c->appkey = "21091597";
$c->secretKey = "a6b443e2efcdf395d00bed00bf68bed5";
$req = new ItemsListGetRequest;
$req->setFields("num_iid,title,nick,price");
$req->setNumIids("14956679278,14209973714,13513531615");
$req->setTrackIids("1223_track_451,1223_track_451,1223_track_451");
$resp = $c->execute($req, $sessionKey);
print_r ( $resp);

?>

没有看过这个SDK 也就是 TopSdk.php 不清楚调用的是什么api,至于为什么,其实如果出错会返回错误的信息,对照错误的信息就可以找到原因了

返回信息是这样的。
SimpleXMLElement Object ( ) 

返回信息是这样的。
SimpleXMLElement Object ( )

这个似乎返回了空的xml数据?你还是到open平台那用SDK工具测试一下你的appkey 看看工具那调用是否正常吧,如果正常那么就是这个SDK存在问题了

。。。奇怪,
今天在同一时间测试淘宝的api,appkey和appsecret在php应用中是成功的

但是换到java应用中就出现错误
11Insufficient isv permissionsisv.permission-api-package-limit 。。。。。。/sub_msg>
这是怎么回事儿啊,appkey和appsecret还分语言?!

好了,自己解决了,散分

怎么解决的?我也遇到了

怎么解决的?

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

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

11 Best PHP URL Shortener Scripts (Free and Premium) 11 Best PHP URL Shortener Scripts (Free and Premium) Mar 03, 2025 am 10:49 AM

11 Best PHP URL Shortener Scripts (Free and Premium)

Introduction to the Instagram API Introduction to the Instagram API Mar 02, 2025 am 09:32 AM

Introduction to the Instagram API

Working with Flash Session Data in Laravel Working with Flash Session Data in Laravel Mar 12, 2025 pm 05:08 PM

Working with Flash Session Data in Laravel

Build a React App With a Laravel Back End: Part 2, React Build a React App With a Laravel Back End: Part 2, React Mar 04, 2025 am 09:33 AM

Build a React App With a Laravel Back End: Part 2, React

Simplified HTTP Response Mocking in Laravel Tests Simplified HTTP Response Mocking in Laravel Tests Mar 12, 2025 pm 05:09 PM

Simplified HTTP Response Mocking in Laravel Tests

cURL in PHP: How to Use the PHP cURL Extension in REST APIs cURL in PHP: How to Use the PHP cURL Extension in REST APIs Mar 14, 2025 am 11:42 AM

cURL in PHP: How to Use the PHP cURL Extension in REST APIs

12 Best PHP Chat Scripts on CodeCanyon 12 Best PHP Chat Scripts on CodeCanyon Mar 13, 2025 pm 12:08 PM

12 Best PHP Chat Scripts on CodeCanyon

Notifications in Laravel Notifications in Laravel Mar 04, 2025 am 09:22 AM

Notifications in Laravel

See all articles