Facebook PHP API getReachEstimate -
i quite beginner , trying learn apply things in facebook php sdk, there things poorly explained in documentation.
my goal number of users interested in both "socker" , "football".
i think function getreachestimate($array, $array) that, approach be.
use facebookads\object\reachestimate; use facebookads\object\fields\reachestimatefields; use facebookads\object\adaccount; $account = new adaccount($account_id); $reachestimate = $account->getreachestimate($some_array, $some_array2));
i looked in source of sdk , function takes 2 arrays, explained these arrays must like. if has suggestions, please let me know. thank you.
the first parameter seems irreverent me. i'm not sure. update answer when find. meanwhile here's how it:
suppose following parameters:
$params = [ 'targeting_spec' => ['geo_locations' => ['countries' => ['us']]] ]; $fields = [];
then call in following way:
$adaccount = new adaccount($adaccountid); $adaccount->getreachestimate($fields, $params)->getdata();
so, put targeting spec in $params
, calls
hope helps!
Comments
Post a Comment