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
public class AdCreative extends NamedAdsObject
Represents the AdGroup Creative type.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AdCreative()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getActorId()
String
getActorImageHash()
String
getActorImageUrl()
String
getActorName()
List<AdLabel>
getAdlabels()
String
getApplinkTreatment()
Deep link fallback behavior for dynamic product ads if the app is not installed.AdAssetFeedSpec
getAssetFeedSpec()
Used for Dynamic Creative to automatically experiment and deliver different variations of an ad's creative.String
getBody()
String
getCallToActionType()
String
getCreativeId()
AdsImageCrops
getImageCrops()
String
getImageHash()
String
getImageUrl()
String
getInstagramActorId()
String
getInstagramPermalinkUrl()
String
getInstagramStoryId()
Instagram Story ID -- GETTERString
getInstagramUserId()
AdCreativeInteractiveComponentsSpec
getInteractiveComponentsSpec()
String
getLinkOgId()
String
getLinkUrl()
String
getObjectId()
String
getObjectStoryId()
AdCreativeObjectStorySpec
getObjectStorySpec()
String
getObjectType()
String
getObjectUrl()
String
getPlatformCustomizations()
String
getProductSetId()
String
getRunStatus()
String
getSourceInstagramMediaId()
String
getTemplateUrl()
String
getThumbnailUrl()
String
getTitle()
String
getUrlTags()
Boolean
getUsePageActorOverride()
String
getVideoId()
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
setBody(String body)
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
setTitle(String title)
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 Detail
-
AdCreative
public AdCreative()
-
-
Method Detail
-
getActorId
public String getActorId()
- Returns:
- The actor ID (Page ID) of this creative.
-
setActorId
public void setActorId(String actorId)
The actor ID (Page ID) of this creative. This field is available only for mobile app ads created before 2015
-
getActorImageHash
public String getActorImageHash()
- Returns:
- The image used for actor's icon.
-
setActorImageHash
public void setActorImageHash(String actorImageHash)
The image used for actor's icon. This field is available only for mobile app ads created before 2015
-
getActorImageUrl
public String getActorImageUrl()
- Returns:
- The URL of the icon for the actor (Page ID) of this creative.
-
setActorImageUrl
public void setActorImageUrl(String actorImageUrl)
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
public String getActorName()
- Returns:
- The title text used for actor.
-
setActorName
public void setActorName(String actorName)
The title text used for actor. This field is available only for mobile app ads created before 2015
-
getAdlabels
public List<AdLabel> getAdlabels()
- Returns:
- Ad Labels that are associated with this creative
-
setAdlabels
public void setAdlabels(List<AdLabel> adlabels)
Ad Labels that are associated with this creative
-
getApplinkTreatment
public String getApplinkTreatment()
Deep link fallback behavior for dynamic product ads if the app is not installed.
-
setApplinkTreatment
public void setApplinkTreatment(String applinkTreatment)
Deep link fallback behavior for dynamic product ads if the app is not installed.
-
getAssetFeedSpec
public AdAssetFeedSpec getAssetFeedSpec()
Used for Dynamic Creative to automatically experiment and deliver different variations of an ad's creative.
-
setAssetFeedSpec
public void setAssetFeedSpec(AdAssetFeedSpec assetFeedSpec)
Used for Dynamic Creative to automatically experiment and deliver different variations of an ad's creative.
-
getCallToActionType
public String getCallToActionType()
- Returns:
- The call to action button text and header text of legacy ads.
-
setCallToActionType
public void setCallToActionType(String callToActionType)
The call to action button text and header text of legacy ads.
-
getImageCrops
public AdsImageCrops getImageCrops()
- Returns:
- A JSON object defining crop dimensions for the image specified.
-
setImageCrops
public void setImageCrops(AdsImageCrops imageCrops)
A JSON object defining crop dimensions for the image specified. See image crop reference for more details
-
getImageHash
public String getImageHash()
- Returns:
- Image hash for an image you can use in creatives.
-
setImageHash
public void setImageHash(String imageHash)
Image hash for an image you can use in creatives. See image library for more details
-
getImageUrl
public String getImageUrl()
- Returns:
- A URL for the image for this creative.
-
setImageUrl
public void setImageUrl(String imageUrl)
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
public String getInstagramActorId()
- Returns:
- Instagram actor ID
-
setInstagramActorId
public void setInstagramActorId(String instagramActorId)
Instagram actor ID
-
getInstagramPermalinkUrl
public String getInstagramPermalinkUrl()
- Returns:
- Instagram permalink
-
setInstagramPermalinkUrl
public void setInstagramPermalinkUrl(String instagramPermalinkUrl)
Instagram permalink
-
getInstagramStoryId
public String getInstagramStoryId()
Instagram Story ID -- GETTER- Returns:
- Instagram Story ID
-
setInstagramStoryId
public void setInstagramStoryId(String instagramStoryId)
Instagram Story ID -- GETTER
-
getInstagramUserId
public String getInstagramUserId()
-
setInstagramUserId
public void setInstagramUserId(String instagramUserId)
-
getInteractiveComponentsSpec
public AdCreativeInteractiveComponentsSpec getInteractiveComponentsSpec()
-
setInteractiveComponentsSpec
public void setInteractiveComponentsSpec(AdCreativeInteractiveComponentsSpec interactiveComponentsSpec)
-
getLinkOgId
public String getLinkOgId()
- Returns:
- The Open Graph (OG) ID for the link in this creative if the landing page has OG tags
-
setLinkOgId
public void setLinkOgId(String linkOgId)
The Open Graph (OG) ID for the link in this creative if the landing page has OG tags
-
getLinkUrl
public String 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
public void 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. 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
public String getObjectId()
- Returns:
- The ID of the promoted_object or object that is relevant to the ad and ad type
-
setObjectId
public void setObjectId(String objectId)
The ID of the promoted_object or object that is relevant to the ad and ad type
-
getObjectStoryId
public String getObjectStoryId()
- Returns:
- The ID of a page post to use in an ad.
-
setObjectStoryId
public void setObjectStoryId(String objectStoryId)
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
public AdCreativeObjectStorySpec getObjectStorySpec()
- Returns:
- The page id and the content to create a new unpublished page post
-
setObjectStorySpec
public 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_data
-
getObjectType
public String getObjectType()
- Returns:
- The type of object that is being advertised.
-
setObjectType
public void setObjectType(String objectType)
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
public String getObjectUrl()
- Returns:
- Destination URL for a link ads not connected to a page
-
setObjectUrl
public void setObjectUrl(String objectUrl)
Destination URL for a link ads not connected to a page
-
getPlatformCustomizations
public String getPlatformCustomizations()
- Returns:
- Use this field to customize the media for different Facebook placements.
-
setPlatformCustomizations
public void setPlatformCustomizations(String platformCustomizations)
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
public String getProductSetId()
- Returns:
- The ID of the product set for this creative. See dynamic product ads for more detail
-
setProductSetId
public void setProductSetId(String productSetId)
The ID of the product set for this creative. See dynamic product ads for more detail
-
getSourceInstagramMediaId
public String getSourceInstagramMediaId()
-
setSourceInstagramMediaId
public void setSourceInstagramMediaId(String sourceInstagramMediaId)
-
getRunStatus
public String getRunStatus()
- Returns:
- The run status of this creative.
-
setRunStatus
public void setRunStatus(String runStatus)
The run status of this creative. Allowed values are:- ACTIVE
- DELETED
-
getTemplateUrl
public String getTemplateUrl()
- Returns:
- The Tracking URL for dynamic product ads.
-
setTemplateUrl
public void setTemplateUrl(String templateUrl)
The Tracking URL for dynamic product ads. See dynamic product ads for more detail
-
getThumbnailUrl
public String getThumbnailUrl()
- Returns:
- The URL to a thumbnail for this creative.
-
setThumbnailUrl
public void setThumbnailUrl(String thumbnailUrl)
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
-
getUrlTags
public String getUrlTags()
- Returns:
- A set of query string parameters
-
setUrlTags
public 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 only
-
getUsePageActorOverride
public Boolean getUsePageActorOverride()
-
setUsePageActorOverride
public void setUsePageActorOverride(Boolean usePageActorOverride)
-
getVideoId
public String getVideoId()
-
setVideoId
public void setVideoId(String videoId)
-
getCreativeId
public String getCreativeId()
-
setCreativeId
public void setCreativeId(String creativeId)
-
-