2016-06-11 122 views
0

目標我已經使用了營銷API 2.6版本。在2.5版本中,我們可以使用字段定位來檢索廣告集中的廣告。但在2.6中,不支持字段定位。我想取回age_min,age_max,geo_locations和page_types。如何檢索廣告集中的定位字段?這是我使用來獲取領域閱讀廣告設置領域與Facebook的營銷API

if(is_null(ACCESS_TOKEN) || is_null(APP_ID) || is_null(APP_SECRET)) { 
     throw new \Exception(
     'You must set your access token, app id and app secret before executing' 
    ); 
    } 
    if (is_null(ACCOUNT_ID)) { 
     throw new \Exception(
     'You must set your account id before executing'); 
    } 
    Api::init(APP_ID, APP_SECRET, ACCESS_TOKEN); 
    $adSet  = new AdSet($adSetId); 
    $fields  = array('name', 'targeting', 'creative', 'conversion_specs', 'redownload', 'genders', 'tracking_specs'); 
    $result  = $adSet->getAds($fields, $limit); 

回答

0

也許 $結果= $ adSet->閱讀($字段)的代碼; 應工作?

我認爲「getAds」讓你的adset下的廣告。 看起來你感興趣的adset的領域,而不是adset下的廣告。