lundi 30 mars 2015

Facebook Ads API - how to add multiple rules to custom audience api call in PHP

I am trying to add 2 rules to api call like below:



$parameters = "name=TEST-Registered-CA&";
$parameters .= "subtype=WEBSITE&";
$parameters .= "retention_days=180&";
$parameters .= 'rule={"and":[{"url":{"i_contains":"thankyou.asp"}},{"url":{"i_contains":"HotelVenueState=CA"}}]}';

http://ift.tt/1CidIm1;



When i try to run above on Facebook Graph Explorer, it gives following error "(#2654) Invalid JSON for rule: Supplied string for rule is not valid JSON" Rerence url (enter link description here



Can any one tell me what i am doing wrong with json ?


Aucun commentaire:

Enregistrer un commentaire