Package com.restfb.types.ads
Class AdCreative
java.lang.Object
com.restfb.types.AbstractFacebookType
com.restfb.types.ads.BaseAdsObject
com.restfb.types.ads.NamedAdsObject
com.restfb.types.ads.AdCreative
- All Implemented Interfaces:
Serializable
Represents the AdGroup Creative type.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDeep link fallback behavior for dynamic product ads if the app is not installed.Used for Dynamic Creative to automatically experiment and deliver different variations of an ad's creative.getBody()
Instagram Story ID -- GETTERgetTitle()
void
setActorId
(String actorId) The actor ID (Page ID) of this creative.void
setActorImageHash
(String actorImageHash) The image used for actor's icon.void
setActorImageUrl
(String actorImageUrl) The URL of the icon for the actor (Page ID) of this creative.void
setActorName
(String actorName) The title text used for actor.void
setAdlabels
(List<AdLabel> adlabels) Ad Labels that are associated with this creativevoid
setApplinkTreatment
(String applinkTreatment) Deep link fallback behavior for dynamic product ads if the app is not installed.void
setAssetFeedSpec
(AdAssetFeedSpec assetFeedSpec) Used for Dynamic Creative to automatically experiment and deliver different variations of an ad's creative.void
The body of the advoid
setCallToActionType
(String callToActionType) The call to action button text and header text of legacy ads.void
setCreativeId
(String creativeId) void
setImageCrops
(AdsImageCrops imageCrops) A JSON object defining crop dimensions for the image specified.void
setImageHash
(String imageHash) Image hash for an image you can use in creatives.void
setImageUrl
(String imageUrl) A URL for the image for this creative.void
setInstagramActorId
(String instagramActorId) Instagram actor IDvoid
setInstagramPermalinkUrl
(String instagramPermalinkUrl) Instagram permalinkvoid
setInstagramStoryId
(String instagramStoryId) Instagram Story ID -- GETTERvoid
setInstagramUserId
(String instagramUserId) void
setInteractiveComponentsSpec
(AdCreativeInteractiveComponentsSpec interactiveComponentsSpec) void
setLinkOgId
(String linkOgId) The Open Graph (OG) ID for the link in this creative if the landing page has OG tagsvoid
setLinkUrl
(String linkUrl) Used to identify a specific landing tab on the Page (e.g. a Page tab app) by the Page tab's URL.void
setObjectId
(String objectId) The ID of the promoted_object or object that is relevant to the ad and ad typevoid
setObjectStoryId
(String objectStoryId) The ID of a page post to use in an ad.void
setObjectStorySpec
(AdCreativeObjectStorySpec objectStorySpec) The page id and the content to create a new unpublished page post specified using one of link_data, photo_data, video_data, offer_data, text_data or template_datavoid
setObjectType
(String objectType) The type of object that is being advertised.void
setObjectUrl
(String objectUrl) Destination URL for a link ads not connected to a pagevoid
setPlatformCustomizations
(String platformCustomizations) Use this field to customize the media for different Facebook placements.void
setProductSetId
(String productSetId) The ID of the product set for this creative.void
setRunStatus
(String runStatus) The run status of this creative.void
setSourceInstagramMediaId
(String sourceInstagramMediaId) void
setTemplateUrl
(String templateUrl) The Tracking URL for dynamic product ads.void
setThumbnailUrl
(String thumbnailUrl) The URL to a thumbnail for this creative.void
Title for a link ad (not connected to a Page)void
setUrlTags
(String urlTags) A set of query string parameters which will replace or be appended to urls clicked from page post ads, and canvas app install creatives onlyvoid
setUsePageActorOverride
(Boolean usePageActorOverride) void
setVideoId
(String videoId) Methods inherited from class com.restfb.types.ads.NamedAdsObject
getName, setName
Methods inherited from class com.restfb.types.ads.BaseAdsObject
getId, setId
Methods inherited from class com.restfb.types.AbstractFacebookType
equals, hashCode, toString
-
Constructor Details
-
AdCreative
public AdCreative()
-
-
Method Details
-
getActorId
- Returns:
- The actor ID (Page ID) of this creative.
-
setActorId
The actor ID (Page ID) of this creative. This field is available only for mobile app ads created before 2015 -
getActorImageHash
- Returns:
- The image used for actor's icon.
-
setActorImageHash
The image used for actor's icon. This field is available only for mobile app ads created before 2015 -
getActorImageUrl
- Returns:
- The URL of the icon for the actor (Page ID) of this creative.
-
setActorImageUrl
The URL of the icon for the actor (Page ID) of this creative. This field is only available for mobile app ads created before 2015 -
getActorName
- Returns:
- The title text used for actor.
-
setActorName
The title text used for actor. This field is available only for mobile app ads created before 2015 -
getAdlabels
- Returns:
- Ad Labels that are associated with this creative
-
setAdlabels
Ad Labels that are associated with this creative -
getApplinkTreatment
Deep link fallback behavior for dynamic product ads if the app is not installed. -
setApplinkTreatment
Deep link fallback behavior for dynamic product ads if the app is not installed. -
getAssetFeedSpec
Used for Dynamic Creative to automatically experiment and deliver different variations of an ad's creative. -
setAssetFeedSpec
Used for Dynamic Creative to automatically experiment and deliver different variations of an ad's creative. -
getBody
- Returns:
- The body of the ad
-
setBody
The body of the ad -
getCallToActionType
- Returns:
- The call to action button text and header text of legacy ads.
-
setCallToActionType
The call to action button text and header text of legacy ads. -
getImageCrops
- Returns:
- A JSON object defining crop dimensions for the image specified.
-
setImageCrops
A JSON object defining crop dimensions for the image specified. See image crop reference for more details -
getImageHash
- Returns:
- Image hash for an image you can use in creatives.
-
setImageHash
Image hash for an image you can use in creatives. See image library for more details -
getImageUrl
- Returns:
- A URL for the image for this creative.
-
setImageUrl
A URL for the image for this creative. The image specified at this URL will be saved into the ad account's image library -
getInstagramActorId
- Returns:
- Instagram actor ID
-
setInstagramActorId
Instagram actor ID -
getInstagramPermalinkUrl
- Returns:
- Instagram permalink
-
setInstagramPermalinkUrl
Instagram permalink -
getInstagramStoryId
Instagram Story ID -- GETTER- Returns:
- Instagram Story ID
-
setInstagramStoryId
Instagram Story ID -- GETTER -
getInstagramUserId
-
setInstagramUserId
-
getInteractiveComponentsSpec
-
setInteractiveComponentsSpec
public void setInteractiveComponentsSpec(AdCreativeInteractiveComponentsSpec interactiveComponentsSpec) -
getLinkOgId
- Returns:
- The Open Graph (OG) ID for the link in this creative if the landing page has OG tags
-
setLinkOgId
The Open Graph (OG) ID for the link in this creative if the landing page has OG tags -
getLinkUrl
- Returns:
- Used to identify a specific landing tab on the Page (e.g. a Page tab app) by the Page tab's URL.
-
setLinkUrl
Used to identify a specific landing tab on the Page (e.g. a Page tab app) by the Page tab's URL. See connection objects for retrieving Page tabs' URLs. app_data parameters may be added to the url to pass data to a tab app -
getObjectId
- Returns:
- The ID of the promoted_object or object that is relevant to the ad and ad type
-
setObjectId
The ID of the promoted_object or object that is relevant to the ad and ad type -
getObjectStoryId
- Returns:
- The ID of a page post to use in an ad.
-
setObjectStoryId
The ID of a page post to use in an ad. This ID can be retrieved by using the graph API to query the posts of the page. If an image is used in the post, it will be downloaded and available in your account's image library -
getObjectStorySpec
- Returns:
- The page id and the content to create a new unpublished page post
-
setObjectStorySpec
The page id and the content to create a new unpublished page post specified using one of link_data, photo_data, video_data, offer_data, text_data or template_data -
getObjectType
- Returns:
- The type of object that is being advertised.
-
setObjectType
The type of object that is being advertised. Allowed values are:- PAGE
- DOMAIN
- EVENT
- STORE_ITEM: refers to an iTunes or Google Play store destination
- OFFER
- SHARE: from a page
- PHOTO
- STATUS: of a page
- VIDEO
- APPLICATION: app on Facebook
- INVALID: when an invalid object_id was specified such as a deleted object or if you do not have permission to see the object. In very few cases, this field may be empty if Facebook is unable to identify the type of advertised object
-
getObjectUrl
- Returns:
- Destination URL for a link ads not connected to a page
-
setObjectUrl
Destination URL for a link ads not connected to a page -
getPlatformCustomizations
- Returns:
- Use this field to customize the media for different Facebook placements.
-
setPlatformCustomizations
Use this field to customize the media for different Facebook placements. Currently you can use this field for customizing images only. The media specified here replaces the original media defined in the ad creative when the ad displays on those placements. For example, if you define a media here for the instagram key, Facebook uses that media instead of the media defined in the ad creative when showing the ad on Instagram. -
getProductSetId
- Returns:
- The ID of the product set for this creative. See dynamic product ads for more detail
-
setProductSetId
The ID of the product set for this creative. See dynamic product ads for more detail -
getSourceInstagramMediaId
-
setSourceInstagramMediaId
-
getRunStatus
- Returns:
- The run status of this creative.
-
setRunStatus
The run status of this creative. Allowed values are:- ACTIVE
- DELETED
-
getTemplateUrl
- Returns:
- The Tracking URL for dynamic product ads.
-
setTemplateUrl
The Tracking URL for dynamic product ads. See dynamic product ads for more detail -
getThumbnailUrl
- Returns:
- The URL to a thumbnail for this creative.
-
setThumbnailUrl
The URL to a thumbnail for this creative. You can optionally request dimensions of this thumbnail by providing the thumbnail_width and thumbnail_height parameters. See example for more detail -
getTitle
- Returns:
- Title for a link ad (not connected to a Page)
-
setTitle
Title for a link ad (not connected to a Page) -
getUrlTags
- Returns:
- A set of query string parameters
-
setUrlTags
A set of query string parameters which will replace or be appended to urls clicked from page post ads, and canvas app install creatives only -
getUsePageActorOverride
-
setUsePageActorOverride
-
getVideoId
-
setVideoId
-
getCreativeId
-
setCreativeId
-