Package com.restfb.types.ads
Class CustomAudience
java.lang.Object
com.restfb.types.AbstractFacebookType
com.restfb.types.ads.BaseAdsObject
com.restfb.types.ads.NamedAdsObject
com.restfb.types.ads.CustomAudience
- All Implemented Interfaces:
Serializable
Represents the Custom
Audience Marketing API type
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetRule()voidsetAccountId(String accountId) Ad Account IDvoidsetApproximateCount(Long approximateCount) Approximate number of people in this audiencevoidsetDataSource(CustomAudienceDataSource dataSource) JSON dictionary of type, sub_type to indicate by which method the custom audience was created.voidsetDeliveryStatus(CustomAudienceStatus deliveryStatus) JSON dictionary of code and description.voidsetDescription(String description) Custom audience descriptionvoidsetExcludedCustomAudiences(List<CustomAudience> excludedCustomAudiences) voidsetExternalEventSource(AdsPixel externalEventSource) Read-only JSON dictionary with key id containing the pixel id whose traffic generated this custom audiencevoidsetIncludedCustomAudiences(List<CustomAudience> includedCustomAudiences) voidsetLastUsedTime(String lastUsedTime) last used time of this object by the current viewervoidsetLookalikeAudienceIds(List<String> lookalikeAudienceIds) The IDs of the lookalike audiences generated from this audiencevoidsetLookalikeSpec(LookalikeSpec lookalikeSpec) Generated only when the subtype is LOOKALIKE.voidsetOperationStatus(CustomAudienceStatus operationStatus) JSON dictionary of code to int value and description to a description string.voidsetOptOutLink(String optOutLink) Your opt-out URL so people can choose not to be targetedvoidsetOriginAudienceId(Long originAudienceId) The ID of origin Custom Audience.voidsetOwnerBusiness(Business ownerBusiness) owner business of this objectvoidsetPermissionForActions(CustomAudiencePermission permissionForActions) JSON dictionary of permissions (string) to boolean value if the custom audience has that permissionvoidsetPixelId(String pixelId) ID of the pixel which is collecting events for this Website Custom audiencevoidsetRetentionDays(Long retentionDays) Number of days to keep the user in this cluster.voidAudience rules to be applied on the referrer URLvoidsetSubtype(String subtype) Type of custom audience, derived from original data sourcevoidsetTimeContentUpdated(Long timeContentUpdated) Last update of people in this custom audiencevoidsetTimeCreated(Long timeCreated) Creation timevoidsetTimeUpdated(Long timeUpdated) Last time this audience metadata was updatedMethods inherited from class com.restfb.types.ads.NamedAdsObject
getName, setNameMethods inherited from class com.restfb.types.ads.BaseAdsObject
getId, setIdMethods inherited from class com.restfb.types.AbstractFacebookType
equals, hashCode, toString
-
Constructor Details
-
CustomAudience
public CustomAudience()
-
-
Method Details
-
getAccountId
- Returns:
- Ad Account ID
-
setAccountId
Ad Account ID -
getApproximateCount
- Returns:
- Approximate number of people in this audience
-
setApproximateCount
Approximate number of people in this audience -
getDataSource
- Returns:
- JSON dictionary of type, sub_type to indicate by which method the custom audience was created.
-
setDataSource
JSON dictionary of type, sub_type to indicate by which method the custom audience was created. -
getDeliveryStatus
- Returns:
- dictionary of code and description
-
setDeliveryStatus
JSON dictionary of code and description. Indicates whether or not an audience can be used in ads. There are two situations that an audience will make ads not deliverable. First, if the size is smaller than 20 people, the audience can't be delivered. Second, if for some reason the audience is disabled (such as violation of policy, expired), validation will fail when it is used in ads. -
getDescription
- Returns:
- Custom audience description
-
setDescription
Custom audience description -
getExcludedCustomAudiences
-
setExcludedCustomAudiences
-
getExternalEventSource
- Returns:
- Read-only JSON dictionary with key id containing the pixel id whose traffic generated this custom audience
-
setExternalEventSource
Read-only JSON dictionary with key id containing the pixel id whose traffic generated this custom audience -
getIncludedCustomAudiences
-
setIncludedCustomAudiences
-
getLastUsedTime
- Returns:
- last used time of this object by the current viewer
-
setLastUsedTime
last used time of this object by the current viewer -
getLookalikeAudienceIds
- Returns:
- The IDs of the lookalike audiences generated from this audience
-
setLookalikeAudienceIds
The IDs of the lookalike audiences generated from this audience -
getLookalikeSpec
- Returns:
- Generated only when the subtype is LOOKALIKE.
-
setLookalikeSpec
Generated only when the subtype is LOOKALIKE. -
getOperationStatus
- Returns:
- dictionary of code to int value and description to a description string
-
setOperationStatus
JSON dictionary of code to int value and description to a description string. The operation status represents the status of the last operation performed on an audience. In general, it will have following states:- 0: Status not available
- 200: Normal: there is no updating or issues found
- 400: Warning: there is some message we would like advertisers to know
- 410: No upload: no file has been uploaded
- 411: Low match rate: low rate of matched people
- 412: High invalid rate: high rate of invalid people
- 421: No pixel: Your Facebook pixel hasn't been installed on your website yet
- 422: Pixel not firing: Your Facebook pixel isn't firing
- 423: Invalid pixel: Your Facebook pixel is invalid
- 431: Lookalike Audience refresh failed
- 432: Lookalike Audience build failed
- 433: Lookalike Audience build failed
- 434: Lookalike Audience build retrying
- 500: Error: there is some error and advertisers need to take action items to fix the error
-
getOptOutLink
- Returns:
- Your opt-out URL so people can choose not to be targeted
-
setOptOutLink
Your opt-out URL so people can choose not to be targeted -
getOriginAudienceId
- Returns:
- The ID of origin Custom Audience. The origin audience you create must have a minimum size of 100.
-
setOriginAudienceId
The ID of origin Custom Audience. The origin audience you create must have a minimum size of 100. -
getOwnerBusiness
- Returns:
- owner business of this object
-
setOwnerBusiness
owner business of this object -
getPermissionForActions
- Returns:
- JSON dictionary of permissions (string) to boolean value if the custom audience has that permission
-
setPermissionForActions
JSON dictionary of permissions (string) to boolean value if the custom audience has that permission -
getPixelId
- Returns:
- ID of the pixel which is collecting events for this Website Custom audience
-
setPixelId
ID of the pixel which is collecting events for this Website Custom audience -
getRetentionDays
- Returns:
- Number of days to keep the user in this cluster.
-
setRetentionDays
Number of days to keep the user in this cluster. You can use any value between 1 and 180 days. Defaults to 14 days if not specified -
getRule
- Returns:
- Audience rules to be applied on the referrer URL
-
setRule
Audience rules to be applied on the referrer URL -
getSubtype
- Returns:
- Type of custom audience, derived from original data source
-
setSubtype
Type of custom audience, derived from original data source -
getTimeContentUpdated
- Returns:
- Last update of people in this custom audience
-
setTimeContentUpdated
Last update of people in this custom audience -
getTimeCreated
- Returns:
- Creation time
-
setTimeCreated
Creation time -
getTimeUpdated
- Returns:
- Last time this audience metadata was updated
-
setTimeUpdated
Last time this audience metadata was updated
-