Class 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
      • 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
      • setActorName

        public void setActorName​(String actorName)
        The title text used for actor. This field is available only for mobile app ads created before 2015
      • 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.
      • setBody

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