[Python] Facebook Ads Api : Remove users from Custom Audience does not have any effect to its...

Discussão em 'Python' iniciado por Stack, Maio 7, 2025.

  1. Stack

    Stack Membro Participativo

    I am using facebook python's ads api to add and remove user's emails from custom audience.

    I have successfully added user's emails to audience using these lines of code (based on Facebook examples):

    #Add users
    #users is a dataframe. I am creating a list of emails like this
    #['a@gmail.com','b@gmail.com',....]

    users_email_list = users['email'].tolist()
    CustomAudience(audience_id).add_users(CustomAudience.Schema.email_hash,
    users_email_list)


    I have successfully removed, but with no effect, user's emails from audience using these lines of code (based on Facebook examples):

    #Remove users

    CustomAudience(audience_id).remove_users(CustomAudience.Schema.email_hash,
    users_email_list)


    I have included 100 different Facebook emails for this audience where I have 100% match. After adding users emails I am visiting facebook ads console (business.facebook.com) to inspect Custom Audience. There I can see that 100 rows have been added and the size indication is 100 (with Ready status-green). After I am running the second block of code to remove the users emails I have added. In facebook ads console I can see that 100 rows have been removed but even after waiting a couple of days size remains the same 100, with Status Ready - green. (I have tried this also with less than 100 emails)

    Is there something I am missing?

    Continue reading...

Compartilhe esta Página