Class AdCreative

All Implemented Interfaces:
Serializable

public class AdCreative extends NamedAdsObject
Represents the AdGroup Creative type.
See Also:
  • Constructor Details

  • Method Details

    • 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

      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

      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

      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

      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

      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.
    • getBody

      public String getBody()
      Returns:
      The body of the ad
    • setBody

      public void setBody(String body)
      The body of the ad
    • 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

      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

      Returns:
      Instagram actor ID
    • setInstagramActorId

      public void setInstagramActorId(String instagramActorId)
      Instagram actor ID
    • getInstagramPermalinkUrl

      Returns:
      Instagram permalink
    • setInstagramPermalinkUrl

      public void setInstagramPermalinkUrl(String instagramPermalinkUrl)
      Instagram permalink
    • getInstagramStoryId

      Instagram Story ID -- GETTER
      Returns:
      Instagram Story ID
    • setInstagramStoryId

      public void setInstagramStoryId(String instagramStoryId)
      Instagram Story ID -- GETTER
    • getInstagramUserId

    • setInstagramUserId

      public void setInstagramUserId(String instagramUserId)
    • 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

      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

      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

      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

      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

      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

    • 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

      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

      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
    • getTitle

      public String getTitle()
      Returns:
      Title for a link ad (not connected to a Page)
    • setTitle

      public void setTitle(String title)
      Title for a link ad (not connected to a Page)
    • 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

    • setUsePageActorOverride

      public void setUsePageActorOverride(Boolean usePageActorOverride)
    • getVideoId

      public String getVideoId()
    • setVideoId

      public void setVideoId(String videoId)
    • getCreativeId

    • setCreativeId

      public void setCreativeId(String creativeId)