0

I am unable to add users to a custom audience. I am getting a return value of true (success), however after waiting, no users are ever added to the list. I have used the same list through the power editor and have 90% matches, however when the same list is submitted through the API via Koala, no users are added. The list does go into a status of waiting after I attempt, so I know they received my request.

I've tried both MD5 and CRC32_MD5 hashing with the same result. I've checked my hashing method result against the dev docs examples and they look fine.

members_array = [{email_hash: "CRC32_MD5_hash"}, {email_hash: "CRC32_MD5_hash"}, ...]
Koala_object.put_connections(audience_id, nil, users: members_array.to_json)

I've debugged the params. All looks fine. At a loss since the return from Facebook is useless.

Garrett Davis
  • 339
  • 2
  • 11

1 Answers1

0

Ahhh figured it out...

From https://developers.facebook.com/docs/reference/ads-api/custom-audience-targeting/

 curl -F 'users=[{"email_hash":"MD5"}, {"email_hash":"MD5"}, {"email_hash":"MD5"} …]'
   https://graph.facebook.com/{audience_id}/users?access_token=___

I wasn't passing in the connection 'users' with the params attribute 'users', looked at the url and glossed over it. I did think it was weird I wasn't doing a post on a connection like other api calls, but the connection and the params attribute being the same name threw me. Also getting the result 'true' on an incorrect graph api call, sucks when you're expecting 'true' from the correct call. Inconsistant!

Correct Koala call is:

Koala_object.put_connections(audience_id, 'users', users: members_array.to_json)

Although another issue is, the power editor matched 1100 users, and the api with crc32_md5 is only returning 700 with the same file? Going to try just MD5 hashing and see if I get a different result.

Garrett Davis
  • 339
  • 2
  • 11