fbbotw.post_target_audience

fbbotw.post_target_audience(countries, audience_type=’all’)[source]

Set the audience who will see your bot in the Discover tab on Messenger.

Usage:
>>> # If you will set the audience to specific contries
>>> # The audience_type param should be set to 'custom'
>>> audience_type = "custom"
>>> countries = {
        "whitelist": ["US", "UK", "CA", "BR"]
    }
>>> response = fbbotw.post_target_audience(
        countries=countries,
        audience_type=audience_type
    )
Parameters:
  • countries (dict) –

    Country object with whitelist/blacklist. Needs to be specified only when audience_type is ‘custom’. Countries should be in list of ISO 3166 Alpha-2 codes. format:

    >>> countries = {
        “whitelist”: [“US”, “BR”]
        “blacklist”: []
    }
    
  • audience_type (str) – (“all”, “custom”, “none”). Default: “all”
Returns:

Response object

Facebook docs:

/target-audience