Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How would you add users to custom audience? #47

Closed
trip1 opened this issue May 14, 2018 · 4 comments
Closed

How would you add users to custom audience? #47

trip1 opened this issue May 14, 2018 · 4 comments
Labels

Comments

@trip1
Copy link

trip1 commented May 14, 2018

I've created custom audiences based off some of the examples, but I don't see anywhere that says how to add the users to the custom audience. I've tried looking through the other SDK's and it looks they each have a specific function that adds the users to it. I tried using the custom-audience-data-source object to put the hashes in but still no luck. Also tried just placing the schema type and data source in the fields and params when calling the function but neither seem to do anything either. Can it be done with the SDK or do I just have to use something else?

@michaelwclark
Copy link
Contributor

It's the same flow as the initial create. Just POST to the <CUSTOM_AUDIENCE_ID>/users endpoint. It's the same as your initial population of the custom audience to add more users. Here is an example CURL request to do so.

curl \
  -F 'payload={ 
    "schema": "EMAIL_SHA256", 
    "data": [ 
      "9b431636bd164765d63c573c346708846af4f68fe3701a77a3bdd7e7e5166254", 
      "8cc62c145cd0c6dc444168eaeb1b61b351f9b1809a579cc9b4c9e9d7213a39ee", 
      "4eaf70b1f7a797962b9d2a533f122c8039012b31e0a52b34a426729319cb792a" 
    ] 
  }' \
  -F 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v2.11/<CUSTOM_AUDIENCE_ID>/users

@laziob
Copy link

laziob commented May 22, 2018

I did one more try, and cant tell yet if it is working properly but at least got a 200 response.

The params where like this:
const params = {
"payload" : "
{'schema' : 'EMAIL_SHA256',
'data' : ['9b431636bd164765d63c573c346708846af4f68fe3701a77a3bdd7e7e5166254', '8cc62c145cd0c6dc444168eaeb1b61b351f9b1809a579cc9b4c9e9d7213a39ee', '4eaf70b1f7a797962b9d2a533f122c8039012b31e0a52b34a426729319cb792a']
}"};

Hope it helps!

@stale
Copy link

stale bot commented Jan 14, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale label Jan 14, 2020
@stale
Copy link

stale bot commented Jan 21, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants