Package com.restfb.types.ads
Class AdCreativeLinkData
- java.lang.Object
-
- com.restfb.types.AbstractFacebookType
-
- com.restfb.types.ads.AdCreativeLinkData
-
- All Implemented Interfaces:
HasMessage
,Serializable
public class AdCreativeLinkData extends AbstractFacebookType implements HasMessage
Represents the AdCreativeLinkData Marketing API type- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AdCreativeLinkData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Long
getAdditionalImageIndex()
AdCreativeLinkDataAppLinkSpec
getAppLinkSpec()
String
getAttachmentStyle()
String
getBrandedContentSponsorPageId()
String
getBrandedContentSponsorRelationship()
AdCreativeLinkDataCallToAction
getCallToAction()
Boolean
getCanvasEnabled()
String
getCaption()
List<AdCreativeLinkDataChildAttachment>
getChildAttachments()
String
getDescription()
String
getEventId()
Boolean
getForceSingleLink()
AdsImageCrops
getImageCrops()
String
getImageHash()
String
getLink()
String
getMessage()
Boolean
getMultiShareEndCard()
Boolean
getMultiShareOptimized()
String
getName()
String
getOfferId()
String
getPageWelcomeMessage()
String
getPicture()
AdCreativePostClickConfiguration
getPostClickConfiguration()
List<String>
getRetailerItemIds()
void
setAdditionalImageIndex(Long additionalImageIndex)
The index (zero based) of the image from the additionalimages array to use as the ad image for a dynamic product advoid
setAppLinkSpec(AdCreativeLinkDataAppLinkSpec appLinkSpec)
Native deeplinks attached to the postvoid
setAttachmentStyle(String attachmentStyle)
The style of the attachment.void
setBrandedContentSponsorPageId(String brandedContentSponsorPageId)
The branded content sponsor page id.void
setBrandedContentSponsorRelationship(String brandedContentSponsorRelationship)
The branded content sponsor relationship option.void
setCallToAction(AdCreativeLinkDataCallToAction callToAction)
An optional call to action button.void
setCanvasEnabled(Boolean canvasEnabled)
If canvas experience is enabled post clickvoid
setCaption(String caption)
Link caption.void
setChildAttachments(List<AdCreativeLinkDataChildAttachment> childAttachments)
void
setDescription(String description)
Link description.void
setEventId(String eventId)
The id of a Facebook event.void
setForceSingleLink(Boolean forceSingleLink)
Whether to force the post to render in a single link formatvoid
setImageCrops(AdsImageCrops imageCrops)
How to the image should be cropped.void
setImageHash(String imageHash)
Hash of an image in your image library with Facebook.void
setLink(String link)
Link url.void
setMessage(String message)
The main body of the post.void
setMultiShareEndCard(Boolean multiShareEndCard)
If set to false, removes the end card which displays the page icon.void
setMultiShareOptimized(Boolean multiShareOptimized)
If set to true, automatically select and order images and links.void
setName(String name)
Name of the link.void
setOfferId(String offerId)
The id of a Facebook native offer.void
setPageWelcomeMessage(String pageWelcomeMessage)
A welcome text from page to user on Messenger once a user performs send message action on an ad.void
setPicture(String picture)
URL of a picture to use in the post.void
setPostClickConfiguration(AdCreativePostClickConfiguration postClickConfiguration)
void
setRetailerItemIds(List<String> retailerItemIds)
List of product IDs provided by the advertiser for Collections-
Methods inherited from class com.restfb.types.AbstractFacebookType
equals, hashCode, toString
-
-
-
-
Constructor Detail
-
AdCreativeLinkData
public AdCreativeLinkData()
-
-
Method Detail
-
getAdditionalImageIndex
public Long getAdditionalImageIndex()
- Returns:
- The index (zero based) of the image from the additionalimages array to use as the ad image for a dynamic product ad
-
setAdditionalImageIndex
public void setAdditionalImageIndex(Long additionalImageIndex)
The index (zero based) of the image from the additionalimages array to use as the ad image for a dynamic product ad
-
getAppLinkSpec
public AdCreativeLinkDataAppLinkSpec getAppLinkSpec()
- Returns:
- Native deeplinks attached to the post
-
setAppLinkSpec
public void setAppLinkSpec(AdCreativeLinkDataAppLinkSpec appLinkSpec)
Native deeplinks attached to the post
-
getAttachmentStyle
public String getAttachmentStyle()
- Returns:
- The style of the attachment.
-
setAttachmentStyle
public void setAttachmentStyle(String attachmentStyle)
The style of the attachment.
-
getBrandedContentSponsorPageId
public String getBrandedContentSponsorPageId()
- Returns:
- The branded content sponsor page id.
-
setBrandedContentSponsorPageId
public void setBrandedContentSponsorPageId(String brandedContentSponsorPageId)
The branded content sponsor page id.
-
getBrandedContentSponsorRelationship
public String getBrandedContentSponsorRelationship()
- Returns:
- The branded content sponsor relationship option.
-
setBrandedContentSponsorRelationship
public void setBrandedContentSponsorRelationship(String brandedContentSponsorRelationship)
The branded content sponsor relationship option.
-
getCallToAction
public AdCreativeLinkDataCallToAction getCallToAction()
- Returns:
- An optional call to action button
-
setCallToAction
public void setCallToAction(AdCreativeLinkDataCallToAction callToAction)
An optional call to action button. If not specified, on Instagram, a default CTA would be used,{"type":"LEARN_MORE","value": {"link":,}}
.
-
getCanvasEnabled
public Boolean getCanvasEnabled()
- Returns:
- If canvas experience is enabled post click
-
setCanvasEnabled
public void setCanvasEnabled(Boolean canvasEnabled)
If canvas experience is enabled post click
-
getCaption
public String getCaption()
- Returns:
- Link caption.
-
setCaption
public void setCaption(String caption)
Link caption. Overwrites the caption under the title in the link on Facebook. See post for more info. This setting is not used on Instagram.
-
getChildAttachments
public List<AdCreativeLinkDataChildAttachment> getChildAttachments()
-
setChildAttachments
public void setChildAttachments(List<AdCreativeLinkDataChildAttachment> childAttachments)
-
getDescription
public String getDescription()
- Returns:
- Link description.
-
setDescription
public void setDescription(String description)
Link description. Overwrites the description in the link on Facebook. See post for more info. This setting is not used on Instagram.
-
getEventId
public String getEventId()
- Returns:
- The id of a Facebook event.
-
setEventId
public void setEventId(String eventId)
The id of a Facebook event. This is only to be used if this creative is for a Website Clicks campaign, the Call To Action is Buy Tickets, and the link points to the ticketing website of this Facebook event.
-
getForceSingleLink
public Boolean getForceSingleLink()
- Returns:
- Whether to force the post to render in a single link format
-
setForceSingleLink
public void setForceSingleLink(Boolean forceSingleLink)
Whether to force the post to render in a single link format
-
getImageCrops
public AdsImageCrops getImageCrops()
- Returns:
- How to the image should be cropped.
-
setImageCrops
public void setImageCrops(AdsImageCrops imageCrops)
How to the image should be cropped. Different placements use different crop specs. For example, Facebook News Feed uses the crop spec with 191x100 key, and Instagram uses 100x100 crop spec.
-
getImageHash
public String getImageHash()
- Returns:
- Hash of an image in your image library with Facebook.
-
setImageHash
public void setImageHash(String imageHash)
Hash of an image in your image library with Facebook. Specify this field or picture but not both
-
setLink
public void setLink(String link)
Link url. See post for more info. This field is required for a carousel ad .
-
getMessage
public String getMessage()
- Specified by:
getMessage
in interfaceHasMessage
- Returns:
- The main body of the post
-
setMessage
public void setMessage(String message)
The main body of the post. See post for more info. This field is required for a carousel ad .
-
getMultiShareEndCard
public Boolean getMultiShareEndCard()
- Returns:
- If set to false, removes the end card which displays the page icon.
-
setMultiShareEndCard
public void setMultiShareEndCard(Boolean multiShareEndCard)
If set to false, removes the end card which displays the page icon. Default is true. Used by carousel ads.
-
getMultiShareOptimized
public Boolean getMultiShareOptimized()
- Returns:
- If set to true, automatically select and order images and links.
-
setMultiShareOptimized
public void setMultiShareOptimized(Boolean multiShareOptimized)
If set to true, automatically select and order images and links. Default is true. Used by carousel ads.
-
setName
public void setName(String name)
Name of the link. Overwrites the title of the link preview. See post for more info.
-
getOfferId
public String getOfferId()
- Returns:
- The id of a Facebook native offer.
-
setOfferId
public void setOfferId(String offerId)
The id of a Facebook native offer.
-
getPageWelcomeMessage
public String getPageWelcomeMessage()
- Returns:
- A welcome text from page to user on Messenger once a user performs send message action on an ad.
-
setPageWelcomeMessage
public void setPageWelcomeMessage(String pageWelcomeMessage)
A welcome text from page to user on Messenger once a user performs send message action on an ad.
-
getPicture
public String getPicture()
- Returns:
- URL of a picture to use in the post.
-
setPicture
public void setPicture(String picture)
URL of a picture to use in the post. Specify this field or image_hash but not both. See post for more info. The image specified at the URL will be saved into the ad accounts image library
-
getPostClickConfiguration
public AdCreativePostClickConfiguration getPostClickConfiguration()
-
setPostClickConfiguration
public void setPostClickConfiguration(AdCreativePostClickConfiguration postClickConfiguration)
-
getRetailerItemIds
public List<String> getRetailerItemIds()
- Returns:
- List of product IDs provided by the advertiser for Collections
-
setRetailerItemIds
public void setRetailerItemIds(List<String> retailerItemIds)
List of product IDs provided by the advertiser for Collections
-
-