Graph API Version

Ad Account Generatepreviews

When you use a Page Post which links to an app on the Google Play Store or an app on the Apple App Store Facebook overrides the following fields:

  • We overwrite the name parameter of the Page Post with the name of the app from the Play Store or App Store.

  • We import the thumbnail icon of the app associated with the Page Post from the Play Store or App Store.

We only support certain combinations of creatives and ad_format:

  • Link ad not connected to a page - RIGHT_COLUMN_STANDARD
  • Page like ad - RIGHT_COLUMN_STANDARD, DESKTOP_FEED_STANDARD, MOBILE_FEED_STANDARD
  • Event ad: RIGHT_COLUMN_STANDARD
  • Page like ad - RIGHT_COLUMN_STANDARD
  • Page post ad - RIGHT_COLUMN_STANDARD, DESKTOP_FEED_STANDARD, MOBILE_FEED_STANDARD, INSTAGRAM_STANDARD
  • Desktop app ad - DESKTOP_FEED_STANDARD
  • Mobile app install - MOBILE_FEED_STANDARD, INSTAGRAM_STANDARD, MOBILE_BANNER, MOBILE_INTERSTITIAL",
  • Collection ads - Standard ads, no ads with product sets.

Reading

Generate previews for a creative specification

Examples

Create an ad preview using a creative spec for a domain ad for an external website.

use FacebookAds\Object\AdAccount;
use FacebookAds\Object\Fields\AdPreviewFields;

$account = new AdAccount('act_<AD_ACCOUNT_ID>');
$account->getGeneratePreviews(array(), array(
  AdPreviewFields::CREATIVE => <CREATIVE_SPEC>,
  AdPreviewFields::AD_FORMAT => '<FORMAT>',
));
from facebookads.adobjects.adaccount import AdAccount

account = AdAccount('act_<AD_ACCOUNT_ID>')
params = {
    'creative': <CREATIVE_SPEC>,
    'ad_format': '<FORMAT>',
}
account.get_generate_previews(params=params)
APINodeList<AdPreview> adPreviews = new AdAccount(act_<AD_ACCOUNT_ID>, context).getGeneratePreviews()
  .setCreative(<CREATIVE_SPEC>)
  .setAdFormat(<FORMAT>)
  .execute();
curl -G \
  -d 'creative=<CREATIVE_SPEC>' \
  -d 'ad_format=<FORMAT>' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v2.11/act_<AD_ACCOUNT_ID>/generatepreviews

Create an ad preview by specifying page post details

use FacebookAds\Object\AdAccount;
use FacebookAds\Object\Fields\AdCreativeFields;
use FacebookAds\Object\Fields\AdPreviewFields;
use FacebookAds\Object\Values\AdPreviewAdFormatValues;

$account = new AdAccount('act_<AD_ACCOUNT_ID>');
$previews = $account->getGeneratePreviews(array(), array(
  AdPreviewFields::CREATIVE => array(
    AdCreativeFields::OBJECT_ID => <PAGE_ID>,
  ),
  AdPreviewFields::AD_FORMAT => AdPreviewAdFormatValues::DESKTOP_FEED_STANDARD,
  AdPreViewFields::POST => array(
    'link' => '<URL>',
    'message' => 'Post message',
    'picture' => '<IMAGE_URL>',
    'name' => 'Post name',
    'caption' => 'Post caption',
    'description' => 'Post description',
  ),
));
from facebookads.adobjects.adaccount import AdAccount
from facebookads.adobjects.adpreview import AdPreview

creative = {
    'object_id': page_id,
}

post = {
    'link': '<URL>',
    'message': 'Make the world more open and connected',
    'picture': '<IMAGE_URL>',
    'name': 'Facebook',
    'caption': 'www.facebook.com',
    'description': 'Facebook is a social utility that connects people with '
                   'friends and others who work, study and live around them',
}

account = AdAccount('act_<AD_ACCOUNT_ID>')
params = {
    'ad_format': AdPreview.AdFormat.desktop_feed_standard,
    'creative': creative,
    'post': post,
}
ad_preview = account.get_generate_previews(params=params)
print(ad_preview)
APINodeList<AdPreview> adPreviews = new AdAccount(act_<AD_ACCOUNT_ID>, context).getGeneratePreviews()
  .setCreative(
    new AdCreative()
      .setFieldObjectId(<PAGE_ID>)
  )
  .setAdFormat(AdPreview.EnumAdFormat.VALUE_DESKTOP_FEED_STANDARD)
  .setPost("{\"link\":\"" + <URL> + "\",\"message\":\"Post message\",\"picture\":\"" + <IMAGE_URL> + "\",\"name\":\"Post name\",\"caption\":\"Post caption\",\"description\":\"Post description\"}")
  .execute();
curl -G \
  -d 'creative={"object_id":"<PAGE_ID>"}' \
  -d 'ad_format=DESKTOP_FEED_STANDARD' \
  --data-urlencode 'post={ 
    "link": "<URL>", 
    "message": "Post message", 
    "picture": "<IMAGE_URL>", 
    "name": "Post name", 
    "caption": "Post caption", 
    "description": "Post description" 
  }' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v2.11/act_<AD_ACCOUNT_ID>/generatepreviews

Create an ad preview using object_story_spec

use FacebookAds\Object\AdAccount;
use FacebookAds\Object\AdCreative;
use FacebookAds\Object\Fields\AdCreativeFields;
use FacebookAds\Object\Fields\AdPreviewFields;
use FacebookAds\Object\Fields\AdCreativeLinkDataFields;
use FacebookAds\Object\Fields\AdCreativeObjectStorySpecFields;
use FacebookAds\Object\AdCreativeLinkData;
use FacebookAds\Object\AdCreativeObjectStorySpec;
use FacebookAds\Object\Values\AdPreviewAdFormatValues;
use FacebookAds\Object\Values\AdCreativeCallToActionTypeValues;

$link_data = new AdCreativeLinkData();
$link_data->setData(array(
  AdCreativeLinkDataFields::LINK => '<URL>',
  AdCreativeLinkDataFields::MESSAGE => 'Message',
  AdCreativeLinkDataFields::NAME => 'Name',
  AdCreativeLinkDataFields::DESCRIPTION => 'Description',
  AdCreativeLinkDataFields::CALL_TO_ACTION => array(
    'type' => AdCreativeCallToActionTypeValues::SIGN_UP,
    'value' => array(
      'link' => '<URL>',
    ),
  ),
));

$story = new AdCreativeObjectStorySpec();
$story->setData(array(
  AdCreativeObjectStorySpecFields::PAGE_ID => <PAGE_ID>,
  AdCreativeObjectStorySpecFields::LINK_DATA => $link_data,
));

$creative = new AdCreative();
$creative->setData(array(
  AdCreativeFields::OBJECT_STORY_SPEC => $story,
));

$account = new AdAccount('act_<AD_ACCOUNT_ID>');
$account->getGeneratePreviews(array(), array(
  AdPreviewFields::CREATIVE => $creative,
  AdPreviewFields::AD_FORMAT => AdPreviewAdFormatValues::DESKTOP_FEED_STANDARD,
));
from facebookads.adobjects.adaccount import AdAccount
from facebookads.adobjects.adpreview import AdPreview
from facebookads.adobjects.adcreative import AdCreative
from facebookads.adobjects.adcreativelinkdata import AdCreativeLinkData
from facebookads.adobjects.adcreativeobjectstoryspec \
    import AdCreativeObjectStorySpec

link_data = AdCreativeLinkData()
link_data.update({
    AdCreativeLinkData.Field.link: url,
    AdCreativeLinkData.Field.message: "Message",
    AdCreativeLinkData.Field.name: "Name",
    AdCreativeLinkData.Field.description: "Description",
    AdCreativeLinkData.Field.call_to_action: {
        "type": "SIGN_UP",
        "value": {
            "link": url,
            "link_caption": "CTA caption",
        },
    },
})

story = AdCreativeObjectStorySpec()
story.update({
    AdCreativeObjectStorySpec.Field.link_data: link_data,
    AdCreativeObjectStorySpec.Field.page_id: '<PAGE_ID>',
})

creative = AdCreative()
creative.update({
    AdCreative.Field.object_story_spec: story,
})

account = AdAccount('act_<AD_ACCOUNT_ID>')
params = {
    'ad_format': AdPreview.AdFormat.desktop_feed_standard,
    'creative': creative.export_data(),
}
ad_preview = account.get_generate_previews(params=params)
print(ad_preview)
APINodeList<AdPreview> adPreviews = new AdAccount(act_<AD_ACCOUNT_ID>, context).getGeneratePreviews()
  .setCreative(
    new AdCreative()
      .setFieldObjectStorySpec(
        new AdCreativeObjectStorySpec()
          .setFieldLinkData(
            new AdCreativeLinkData()
              .setFieldCallToAction(
                new AdCreativeLinkDataCallToAction()
                  .setFieldType(AdCreativeLinkDataCallToAction.EnumType.VALUE_SIGN_UP)
                  .setFieldValue(
                    new AdCreativeLinkDataCallToActionValue()
                      .setFieldLink(<URL>)
                      .setFieldLinkCaption("CTA Caption")
                  )
              )
              .setFieldDescription("Description")
              .setFieldLink(<URL>)
              .setFieldMessage("Message")
              .setFieldName("Name")
          )
          .setFieldPageId(<PAGE_ID>)
      )
  )
  .setAdFormat(AdPreview.EnumAdFormat.VALUE_DESKTOP_FEED_STANDARD)
  .execute();
curl -G \
  --data-urlencode 'creative={ 
    "object_story_spec": { 
      "link_data": { 
        "call_to_action": {"type":"SIGN_UP","value":{"link":"<URL>"}}, 
        "description": "Description", 
        "link": "<URL>", 
        "message": "Message", 
        "name": "Name" 
      }, 
      "page_id": "<PAGE_ID>" 
    } 
  }' \
  -d 'ad_format=DESKTOP_FEED_STANDARD' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v2.11/act_<AD_ACCOUNT_ID>/generatepreviews

Create an multi-product ad preview using object_story_id. To get an object_story_id, you must first create a Multi-Product Ad.

use FacebookAds\Object\AdAccount;
use FacebookAds\Object\Fields\AdPreviewFields;
use FacebookAds\Object\Fields\AdCreativeFields;
use FacebookAds\Object\Values\AdPreviewAdFormatValues;

$account = new AdAccount('act_<AD_ACCOUNT_ID>');
$account->getGeneratePreviews(array(), array(
  AdPreviewFields::CREATIVE => array(
    AdCreativeFields::OBJECT_STORY_ID => <POST_ID>,
  ),
  AdPreviewFields::AD_FORMAT => AdPreviewAdFormatValues::DESKTOP_FEED_STANDARD,
));
from facebookads.adobjects.adaccount import AdAccount
from facebookads.adobjects.adpreview import AdPreview
from facebookads.adobjects.adcreative import AdCreative

account = AdAccount('act_<AD_ACCOUNT_ID>')
params = {
    'creative': {
        AdCreative.Field.object_story_id: '<POST_ID>',
    },
    'ad_format': AdPreview.AdFormat.desktop_feed_standard,
}
account.get_generate_previews(params=params)
APINodeList<AdPreview> adPreviews = new AdAccount(act_<AD_ACCOUNT_ID>, context).getGeneratePreviews()
  .setCreative(
    new AdCreative()
      .setFieldObjectStoryId(<OBJECT_STORY_ID>)
  )
  .setAdFormat(AdPreview.EnumAdFormat.VALUE_DESKTOP_FEED_STANDARD)
  .execute();
curl -G \
  -d 'creative={"object_story_id":"<POST_ID>"}' \
  -d 'ad_format=DESKTOP_FEED_STANDARD' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v2.11/act_<AD_ACCOUNT_ID>/generatepreviews

Create an app ad preview using object_story_spec. Note that this is the only way to generate a preview for an app ad.

use FacebookAds\Object\AdAccount;
use FacebookAds\Object\AdCreative;
use FacebookAds\Object\Fields\AdCreativeFields;
use FacebookAds\Object\Fields\AdPreviewFields;
use FacebookAds\Object\Fields\AdCreativeLinkDataFields;
use FacebookAds\Object\Fields\AdCreativeObjectStorySpecFields;
use FacebookAds\Object\AdCreativeLinkData;
use FacebookAds\Object\AdCreativeObjectStorySpec;
use FacebookAds\Object\Values\AdPreviewAdFormatValues;
use FacebookAds\Object\Values\AdCreativeCallToActionTypeValues;

$link_data = new AdCreativeLinkData();
$link_data->setData(array(
  AdCreativeLinkDataFields::LINK => '<URL>',
  AdCreativeLinkDataFields::PICTURE => '<IMAGE_URL>',
  AdCreativeLinkDataFields::MESSAGE => 'Message',
  AdCreativeLinkDataFields::NAME => 'Name',
  AdCreativeLinkDataFields::DESCRIPTION => 'Description',
  AdCreativeLinkDataFields::CALL_TO_ACTION => array(
    'type' => AdCreativeCallToActionTypeValues::USE_APP,
    'value' => array(
      'link' => '<URL>',
    ),
  ),
));

$story = new AdCreativeObjectStorySpec();
$story->setData(array(
  AdCreativeObjectStorySpecFields::PAGE_ID => <PAGE_ID>,
  AdCreativeObjectStorySpecFields::LINK_DATA => $link_data,
));

$creative = new AdCreative();
$creative->setData(array(
  AdCreativeFields::OBJECT_STORY_SPEC => $story,
));

$account = new AdAccount('act_<AD_ACCOUNT_ID>');
$account->getGeneratePreviews(array(), array(
  AdPreviewFields::CREATIVE => $creative,
  AdPreviewFields::AD_FORMAT => AdPreviewAdFormatValues::MOBILE_FEED_STANDARD,
));
from facebookads.adobjects.adaccount import AdAccount
from facebookads.adobjects.adpreview import AdPreview
from facebookads.adobjects.adcreative import AdCreative
from facebookads.adobjects.adcreativelinkdata import AdCreativeLinkData
from facebookads.adobjects.adcreativeobjectstoryspec \
    import AdCreativeObjectStorySpec

link_data = AdCreativeLinkData()
link_data.update({
    AdCreativeLinkData.Field.link: url,
    AdCreativeLinkData.Field.message: "Message",
    AdCreativeLinkData.Field.name: "Name",
    AdCreativeLinkData.Field.description: "My description",
    AdCreativeLinkData.Field.call_to_action: {
        "type": "USE_APP",
        "value": {
            "link": url,
            "link_caption": "CTA caption",
        },
    },
})

story = AdCreativeObjectStorySpec()
story.update({
    AdCreativeObjectStorySpec.Field.link_data: link_data,
    AdCreativeObjectStorySpec.Field.page_id: <PAGE_ID>,
})

creative = AdCreative()
creative.update({
    AdCreative.Field.object_story_spec: story,
})

account = AdAccount('act_<AD_ACCOUNT_ID>')
params = {
    'ad_format': AdPreview.AdFormat.desktop_feed_standard,
    'creative': creative.export_data(),
}
ad_preview = account.get_generate_previews(params=params)
print(ad_preview)
APINodeList<AdPreview> adPreviews = new AdAccount(act_<AD_ACCOUNT_ID>, context).getGeneratePreviews()
  .setCreative(
    new AdCreative()
      .setFieldObjectStorySpec(
        new AdCreativeObjectStorySpec()
          .setFieldLinkData(
            new AdCreativeLinkData()
              .setFieldCallToAction(
                new AdCreativeLinkDataCallToAction()
                  .setFieldType(AdCreativeLinkDataCallToAction.EnumType.VALUE_USE_APP)
                  .setFieldValue(
                    new AdCreativeLinkDataCallToActionValue()
                      .setFieldLink(<URL>)
                      .setFieldLinkCaption("CTA Caption")
                  )
              )
              .setFieldDescription("Description")
              .setFieldLink(<URL>)
              .setFieldMessage("Message")
              .setFieldName("Name")
              .setFieldPicture(<IMAGE_URL>)
          )
          .setFieldPageId(<PAGE_ID>)
      )
  )
  .setAdFormat(AdPreview.EnumAdFormat.VALUE_MOBILE_FEED_STANDARD)
  .execute();
curl -G \
  --data-urlencode 'creative={ 
    "object_story_spec": { 
      "link_data": { 
        "call_to_action": {"type":"USE_APP","value":{"link":"<URL>"}}, 
        "description": "Description", 
        "link": "<URL>", 
        "message": "Message", 
        "name": "Name", 
        "picture": "<IMAGE_URL>" 
      }, 
      "page_id": "<PAGE_ID>" 
    } 
  }' \
  -d 'ad_format=MOBILE_FEED_STANDARD' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v2.11/act_<AD_ACCOUNT_ID>/generatepreviews

Example

Graph API Explorer
GET /v6.0/act_<AD_ACCOUNT_ID>/generatepreviews?creative=%3CCREATIVE_SPEC%3E&ad_format=%3CAD_FORMAT%3E HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->get(
    '/act_<AD_ACCOUNT_ID>/generatepreviews?creative=%3CCREATIVE_SPEC%3E&ad_format=%3CAD_FORMAT%3E',
    '{access-token}'
  );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
    "/act_<AD_ACCOUNT_ID>/generatepreviews",
    {
        "creative": "<CREATIVE_SPEC>",
        "ad_format": "<AD_FORMAT>"
    },
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
Bundle params = new Bundle();
params.putString("creative", "<CREATIVE_SPEC>");
params.putString("ad_format", "<AD_FORMAT>");
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/act_<AD_ACCOUNT_ID>/generatepreviews",
    params,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
NSDictionary *params = @{
  @"creative": @"<CREATIVE_SPEC>",
  @"ad_format": @"<AD_FORMAT>",
};
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/act_<AD_ACCOUNT_ID>/generatepreviews"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
curl -X GET \
  -d 'creative="<CREATIVE_SPEC>"' \
  -d 'ad_format="<AD_FORMAT>"' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v6.0/act_<AD_ACCOUNT_ID>/generatepreviews
If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

ParameterDescription
ad_format
enum{AUDIENCE_NETWORK_INSTREAM_VIDEO, AUDIENCE_NETWORK_INSTREAM_VIDEO_MOBILE, AUDIENCE_NETWORK_OUTSTREAM_VIDEO, AUDIENCE_NETWORK_REWARDED_VIDEO, DESKTOP_FEED_STANDARD, FACEBOOK_STORY_MOBILE, INSTAGRAM_EXPLORE_CONTEXTUAL, INSTAGRAM_EXPLORE_IMMERSIVE, INSTAGRAM_STANDARD, INSTAGRAM_STORY, INSTANT_ARTICLE_RECIRCULATION_AD, INSTANT_ARTICLE_STANDARD, INSTREAM_VIDEO_DESKTOP, INSTREAM_VIDEO_MOBILE, JOB_BROWSER_DESKTOP, JOB_BROWSER_MOBILE, MARKETPLACE_MOBILE, MESSENGER_MOBILE_INBOX_MEDIA, MESSENGER_MOBILE_STORY_MEDIA, MOBILE_BANNER, MOBILE_FEED_BASIC, MOBILE_FEED_STANDARD, MOBILE_FULLWIDTH, MOBILE_INTERSTITIAL, MOBILE_MEDIUM_RECTANGLE, MOBILE_NATIVE, RIGHT_COLUMN_STANDARD, SUGGESTED_VIDEO_DESKTOP, SUGGESTED_VIDEO_MOBILE, WATCH_FEED_MOBILE}

Use this to select what placement on Facebook the ad preview should be for. The API returns an iframe, which is only valid for 24 hours.

Required
creative
AdCreative

RequiredSupports Emoji
dynamic_asset_label
string

Provide a label for rendering specific variation of an asset customization ad

dynamic_creative_spec
Object

Dynamic creative spec for dynamic ads.

Supports Emoji
dynamic_customization
Object

For dynamic ads in multiple languages, specify the customization to be applied to the ad

end_date
datetime

Provide an end date for trip.* parameters in the creative

height
int64

Custom height of the resulting iframe, recommended at least 280 x 280 for the large right hand size height.
Note: the parameter affects only the size of the iframe containing the preview object. It has no affect on the actual size of the previewed ad.

place_page_id
Page ID

Place page ID to use when rendering a dynamic local ad preview

post
Object

Specs for a page post. This field is used when the creative field contains only a Page id as object_id in it. Not supported for ad_format = RIGHT_COLUMN_STANDARD

link
URL

Destination URL of the ad

Required
message
UTF-8 string

Post message

Supports Emoji
picture
URL

Image URL

name
UTF-8 encoded string

Post name

caption
UTF-8 encoded string

Post caption

description
UTF-8 encoded string

Post description

call_to_action
Object

Call to action

Supports Emoji
type
enum{BOOK_TRAVEL, CONTACT_US, DONATE, DONATE_NOW, DOWNLOAD, GET_DIRECTIONS, GO_LIVE, INTERESTED, LEARN_MORE, LIKE_PAGE, MESSAGE_PAGE, SAVE, SEND_TIP, SHOP_NOW, SIGN_UP, VIEW_INSTAGRAM_PROFILE, INSTAGRAM_MESSAGE, LOYALTY_LEARN_MORE, GET_MOBILE_APP, INSTALL_MOBILE_APP, USE_MOBILE_APP, INSTALL_APP, USE_APP, PLAY_GAME, WATCH_VIDEO, WATCH_MORE, OPEN_LINK, NO_BUTTON, LISTEN_MUSIC, MOBILE_DOWNLOAD, GET_OFFER, GET_OFFER_VIEW, BUY_NOW, BUY_TICKETS, UPDATE_APP, BET_NOW, ADD_TO_CART, ORDER_NOW, SELL_NOW, GET_SHOWTIMES, LISTEN_NOW, GET_EVENT_TICKETS, SEARCH_MORE, PRE_REGISTER, BOOK_TEST_DRIVE, CHECK_AVAILABILITY, CALL, MISSED_CALL, CALL_NOW, CALL_ME, APPLY_NOW, BUY, GET_QUOTE, SUBSCRIBE, RECORD_NOW, VOTE_NOW, GIVE_FREE_RIDES, REGISTER_NOW, OPEN_MESSENGER_EXT, EVENT_RSVP, CIVIC_ACTION, SEND_INVITES, REQUEST_TIME, SEE_MENU, WHATSAPP_MESSAGE, SEARCH, TRY_IT, TRY_ON, LINK_CARD, DIAL_CODE, FIND_YOUR_GROUPS}

The type of the action. Not all types can be used for all ads. Check Ads Product Guide to see which type can be used for based on the objective of your campaign.

Required
value
Object
Default value: Array

JSON containing the call to action data.

Supports Emoji
link
URL

app_link
string

page
numeric string or integer

link_format
enum {VIDEO_LEAD, VIDEO_LPP, VIDEO_NEKO, VIDEO_NON_LINK, VIDEO_SHOP}

application
numeric string or integer

link_title
string

Supports Emoji
link_description
string

Supports Emoji
link_caption
string

product_link
string

get_movie_showtimes
boolean

sponsorship
Object

link
URL

image
URL

video_annotation
Object

annotations
list<Object>

start_time_in_sec
int64

end_time_in_sec
int64

link
URL

link_title
string

link_description
string

link_caption
string

image_url
URL

header_color
string

logo_url
URL

post_click_cta_title
string

post_click_description_title
string

offer_id
numeric string or integer

offer_view_id
numeric string or integer

advanced_data
Object

offer_id
numeric string or integer

lead_gen_form_id
numeric string or integer

fundraiser_campaign_id
numeric string or integer

event_id
numeric string or integer

event_tour_id
numeric string or integer

app_destination
enum {MESSENGER, MESSENGER_EXTENSIONS, MESSENGER_GAMES, LINK_CARD, MARKETPLACE, WHATSAPP}

app_destination_page_id
numeric string or integer

is_canvas_video_transition_enabled
boolean

whatsapp_number
string

preinput_text
string

customized_message_page_cta_text
string

external_offer_provider_id
numeric string or integer

origins
enum {COMPOSER, CAMERA}

object_store_urls
array<string>

photo_replacement_preview_fbid

product_item_ids
list<string>

A list of Product Item IDs to use when rendering a dynamic ad preview.

start_date
datetime

Provide a start date for trip.* parameters in the creative

width
int64

Custom width of the resulting iframe, recommended at least 280 x 280 for the large right hand size widths.
Note: the parameter affects only the size of the iframe containing the preview object. It has no affect on the actual size of the previewed ad.

Fields

Reading from this edge will return a JSON formatted result:

{ "data": [], "paging": {} }

data

A list of AdPreview nodes.

paging

For more details about pagination, see the Graph API guide.

Validation Rules

ErrorDescription
100Invalid parameter
105The number of parameters exceeded the maximum for this operation
80004There have been too many calls to this ad-account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting.
200Permissions error

Creating

You can't perform this operation on this endpoint.

Updating

You can't perform this operation on this endpoint.

Deleting

You can't perform this operation on this endpoint.