Home php教程 php手册 淘宝客API组件升级调整方法介绍

淘宝客API组件升级调整方法介绍

Jun 13, 2016 am 11:27 AM
api introduce upgrade article method most Taobao components Adjustment

本文章来给大家介绍淘宝客API组件升级调整方法介绍,最近淘宝客API接口升级为淘宝组件调用的接口,略微看一下开发手,发现淘宝给淘宝组件的定义很简单,下面我来给大家介绍。

通俗的讲就是JSSDK的整合和使用。
JSSDK的官方解释:
淘宝JSSDK是基于javascript的SDK,网站通过引入一个JS文件就可以实现:
通过JSSDK提供的方法,安全、便捷的利用javascript访问Taobao API。
通过JSSDK提供的组件方法,快速、简单的集成淘宝电商组件。
对安全性较高的服务开放的唯一入口,例如:关联推荐中用户行为的关联推荐,收藏夹接口等。
合作网站无需强大的后端服务系统,通过前端获取数据并直接展示,可获取到“小投入支撑大量用户”的效果。
为合作网站提供多维度的用户数据分析服务。
php页面的JSSDK的整合
使用诸如 WordPress 这种PHP程序的网站主这次还是很有福利的,
因为官方的文档中便是用php文档整合JSSDK来举例的。
1.在页面中加载jssdk文件
其中appkey=xxxxxxx后面的xxxxx就是你的appkey

 代码如下 复制代码

2.生成签名,存入cookie中

 代码如下 复制代码

$app_key = 'xxxxxxx';/*填写appkey */
$secret='';/*填入Appsecret'*/
$timestamp=time()."000";
//签名所需的字符串拼接
$message = $secret.'app_key'.$app_key.'timestamp'.$timestamp.$secret;
//获得签名
$mysign=strtoupper(hash_hmac("md5",$message,$secret));
//存入时间戳
setcookie("timestamp",$timestamp);
//存入签名
setcookie("sign",$mysign);
?>

淘宝客接口调用

这里给一个最简单的,官方调用接口的示例

 代码如下 复制代码

TOP.api('rest', 'get',{
   method:'taobao.taobaoke.widget.items.convert',
    track_iids:'19237740785_track_11116',
   fields:'num_iid,click_url,commission_rate'
 },function(resp){
   if(resp.error_response){
     alert('taobao.taobaoke.widget.items.convert接口获取商信息品失败!'+resp.error_response.msg);
      return false;
     }
     var respItem=resp.taobaoke_items.taobaoke_item;
     for(var i=0;i      //$("#r"+respItem[i].num_iid).html("佣金:"+Number(respItem[i].commission_rate)/100+"%");
      //$("#a"+respItem[i].num_iid).attr("href",respItem[i].click_url);
      }
 })


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 AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Will R.E.P.O. Have Crossplay?
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

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)

How to recover deleted contacts on WeChat (simple tutorial tells you how to recover deleted contacts) How to recover deleted contacts on WeChat (simple tutorial tells you how to recover deleted contacts) May 01, 2024 pm 12:01 PM

Unfortunately, people often delete certain contacts accidentally for some reasons. WeChat is a widely used social software. To help users solve this problem, this article will introduce how to retrieve deleted contacts in a simple way. 1. Understand the WeChat contact deletion mechanism. This provides us with the possibility to retrieve deleted contacts. The contact deletion mechanism in WeChat removes them from the address book, but does not delete them completely. 2. Use WeChat’s built-in “Contact Book Recovery” function. WeChat provides “Contact Book Recovery” to save time and energy. Users can quickly retrieve previously deleted contacts through this function. 3. Enter the WeChat settings page and click the lower right corner, open the WeChat application "Me" and click the settings icon in the upper right corner to enter the settings page.

How to get Taobao free red envelope 2024 How to get Taobao free red envelope 2024 May 09, 2024 pm 03:22 PM

The 2024 Taobao free order event will be held three times a day. Everyone needs to place an order and pay for the corresponding amount of goods at the corresponding time. The free order amount will be distributed in the form of red envelopes of equal amounts. Next, we will bring you how to receive the Taobao free order red envelope in 2024: grab it For users who are free of charge, the red envelope qualification will be issued to the card and coupon package, which is in a state of activation; the web version of Taobao currently does not have the card and coupon package, and only displays the winning records of the free order event; the card and coupon package is in [Taobao APP-My Taobao] -My Rights-Red Envelope]. How to get red envelopes for free orders on Taobao 20241. For users who grab free orders, the red envelope qualifications will be distributed to the card and coupon packages, which are in a state of waiting for activation; 2. The web version of Taobao currently does not have card and coupon packages, and only displays the winning records of the free order activities. ;3. The card coupon package is in [Taobao APP-My Taobao-My Rights-Red Envelope]

How to set font size on mobile phone (easily adjust font size on mobile phone) How to set font size on mobile phone (easily adjust font size on mobile phone) May 07, 2024 pm 03:34 PM

Setting font size has become an important personalization requirement as mobile phones become an important tool in people's daily lives. In order to meet the needs of different users, this article will introduce how to improve the mobile phone use experience and adjust the font size of the mobile phone through simple operations. Why do you need to adjust the font size of your mobile phone - Adjusting the font size can make the text clearer and easier to read - Suitable for the reading needs of users of different ages - Convenient for users with poor vision to use the font size setting function of the mobile phone system - How to enter the system settings interface - In Find and enter the "Display" option in the settings interface - find the "Font Size" option and adjust it. Adjust the font size with a third-party application - download and install an application that supports font size adjustment - open the application and enter the relevant settings interface - according to the individual

How to turn off red envelope reminder on Taobao How to turn off red envelope reminder on Taobao Apr 01, 2024 pm 06:25 PM

Taobao is a commonly used online shopping software for many friends. You usually place orders and purchase many things from Taobao. It provides users with a red envelope reminder function. Some friends want to turn it off, so hurry up and check out the PHP Chinese website. Take a look. List of steps to turn off red envelope reminders on Taobao 1. Open the personal center of Taobao APP and select the [Settings] button to enter the page. 2. Find the [Message Notification] option. Here you can select the message push switch. Find the red envelope message and turn off the switch. 3. Or you can turn off the notification permission of Taobao APP through the settings page of your mobile phone, so that all messages from Taobao will not enter the push and can only be seen after turning it on. 4. Users can set what types of messages they want to receive, which makes it easier to use.

The secret of hatching mobile dragon eggs is revealed (step by step to teach you how to successfully hatch mobile dragon eggs) The secret of hatching mobile dragon eggs is revealed (step by step to teach you how to successfully hatch mobile dragon eggs) May 04, 2024 pm 06:01 PM

Mobile games have become an integral part of people's lives with the development of technology. It has attracted the attention of many players with its cute dragon egg image and interesting hatching process, and one of the games that has attracted much attention is the mobile version of Dragon Egg. To help players better cultivate and grow their own dragons in the game, this article will introduce to you how to hatch dragon eggs in the mobile version. 1. Choose the appropriate type of dragon egg. Players need to carefully choose the type of dragon egg that they like and suit themselves, based on the different types of dragon egg attributes and abilities provided in the game. 2. Upgrade the level of the incubation machine. Players need to improve the level of the incubation machine by completing tasks and collecting props. The level of the incubation machine determines the hatching speed and hatching success rate. 3. Collect the resources required for hatching. Players need to be in the game

How to use 'Taobao' 510 free red envelope How to use 'Taobao' 510 free red envelope May 08, 2024 pm 10:00 PM

How to use Taobao 510 free red envelope? Taobao recently launched a free order event to celebrate its 510th anniversary. This event allows you to get free order red envelopes, and there are many benefits. I believe many friends want to participate in this event. Some friends have already received free order red envelopes, but they are not. If you know the specific usage, let’s take a look at the relevant introduction today. Instructions for using Taobao’s 510th Anniversary Free Order Red Packet: The free order red pack can be used after all orders placed for guessing questions have been confirmed and received. 1. Users can issue and recover free red envelopes through the web version of Taobao. Currently, there is no card and coupon package, but it can be viewed at [Taobao APP-My Taobao-My Rights-Red Envelopes]. For users who grab the free order, the red envelope qualification will be distributed to the card and coupon package, which is in a state of activation; the card and coupon package is in progress for winning prizes.

Will 'Taobao' free red envelope refunds be returned? Will 'Taobao' free red envelope refunds be returned? May 08, 2024 am 08:16 AM

When shopping on Taobao, we often use free red envelopes to enjoy discounts. But if we need a refund, will these free red envelopes be returned? Let's take a look at the answer to this question. Will Taobao's free red envelopes be refunded? Depending on the situation, when you receive a red envelope, the red envelope is in a pending activation state. Before redeeming the product, the to-be-activated red envelope is not activated and cannot be used temporarily. You will wait until receipt of the purchased goods is confirmed. , the red envelope that needs to be activated can be used. If there is a problem with the product after using the free red envelope and it needs to be returned, the return of the red envelope needs to be judged according to the actual situation: 1. Refund Rules 11. If a refund occurs after the red envelope is used, the red envelope will be returned in proportion. 2. If the red envelope is not overdue, the period of use of the returned red envelope is the original period of use. If it is overdue, it will be issued within 7 days.

Xiaoyi upgraded to an intelligent agent! HarmonyOS NEXT Hongmeng native intelligence opens a new AI era Xiaoyi upgraded to an intelligent agent! HarmonyOS NEXT Hongmeng native intelligence opens a new AI era Jun 22, 2024 am 01:56 AM

On June 21, Huawei Developer Conference 2024 (HDC2024) gathered again in Songshan Lake, Dongguan. At this conference, the most eye-catching thing is that HarmonyOSNEXT officially launched Beta for developers and pioneer users, and comprehensively demonstrated the three "king-breaking" innovative features of HarmonyOSNEXT in all scenarios, native intelligence and native security. HarmonyOSNEXT native intelligence: Opening a new AI era After abandoning the Android framework, HarmonyOSNEXT has become a truly independent operating system independent of Android and iOS, which can be called an unprecedented rebirth. Among its many new features, native intelligence is undoubtedly the new feature that can best bring users intuitive feelings and experience upgrades.

See all articles