无法在google adwords api中设置ProductBiddingCategory

时间:2017-08-09 14:54:34

标签: php google-api google-adwords

我在我的应用程序中使用google adwords api(v 201705),当我想在库存过滤器中设置ProductBiddingCategory时,它无法正常工作。我有一个带有ID的配置。我使用Laravel 5.4和php 5.6。这是第一级:

'category1stLevel' => array(
        '-7183678771116356049' => 'Animals & Pet Supplies',
        '-8901225909846585574' => 'Arts & Entertainment ',
        '-135859741832737125' => 'Baby & Toddler',
        '1630781044279653237' => 'Business & Industrial',
        '-4047358871470385303' => 'Cameras & Optics',
        '-3692872870547437690' => 'Clothing & Accessories',
        '-8991081036712453473' => 'Electronics',
        '-4844290245982195030' => 'Food, Beverages & Tobacco',
        '5791209622805759532' => 'Furniture',
        '1689639310991627077' => 'Hardware',
        '-1319082945867661876' => 'Health & Beauty',
        '-730821788104646261' => 'Home & Garden',
        '-5914235892932915235' => 'Luggage & Bags',
        '513743549703189181' => 'Mature',
        '-823909673284230433' => 'Media',
        '7477391641924216366' => 'Office Supplies',
        '225849170806580462' => 'Religious & Ceremonial ',
        '-7974890371279108093' => 'Software',
        '6085370270382652056' => 'Sporting Goods',
        '-136928849880388598' => 'Toys & Games',
        '-7701278134223972650' => 'Vehicles & Parts'
    )

我这样设置:

$value = new ProductBiddingCategory();
$value->setType('BIDDING_CATEGORY_L1');
$value->setValue(-7183678771116356049);
$productScope->setDimensions([$value]);

似乎php正在将其转换为指数数字(例如-7.18367877111636E + 18),当它设置时,我收到错误'无效的出价类别-7183678771116355789 ....',意思是它不是从头开始的数字。如果我这样设置$value->setValue(-7.18367877111636E+18)它也不起作用。

我该如何设置它?请帮忙。

0 个答案:

没有答案