Reputation: 12251
https://developers.facebook.com/docs/reference/ads-api/custom-audience-targeting/#create gives examples of adding users to a Custom Audience, but they leave in generic names => [{'email_hash: 'HASH'} ...]
so they are not actually examples.
What (EXPLICITLY) do 'email_hash' and 'HASH' represent and could someone give an actual example (just a couple users long would be perfect)?
My current guess is that the string 'email_hash' is literally the string 'email_hash'
, and that 'HASH' is a hash of an email, like hashlib.sha256("[email protected]").hexdigest()
, which would be a super long random-looking string like 'afiouh34r78efiu9h3fuio20h8ui45grt43'
. But this is currently not working for me (though the format of users
is not necessarily problem, I would just like to definitively rule it out).
Upvotes: 1
Views: 2527
Reputation: 3556
curl \
-F 'payload={"schema":"EMAIL_SHA256","data":["6cce3cf897cd3d2e28a293c00d3e6481241f7e3b3c3d48a1c2730810d416e522","cf55271c41b355553db350e1f218e09b585c1f30319041c5c4a8f209f4a8072b","fd9486ac1e02b9848619cd628ee36b9a0f010b237930f4d0c32d213ab1e6cf88","7afb43906db4882f94dd9d7bea495b4da095293a4f53d21ba67322ffa8e8b8c6","e270020a98195d74cf639e2de34d5c845f2f30e402523a02e05dfc9e8a2dd1f1","5a6b2d94b340d55537ab7e7d81ad201461db11db55573194a0ee059dd1ec645d","cfa159538bbf52cecebc72cd34a99000c0e75be133c2264c45e57c8ef99abc8c"]}' \
-F 'session={"session_id":524717974,"batch_seq":1,"estimated_num_total":10200,"last_batch_flag":true}' \
-F 'access_token=CAAXkgWuehJkBALLqJM' \
https://graph.facebook.com/v2.5/603517/users
Upvotes: 1