versión API de marketing

Vistas previas de anuncios

Obtén la vista previa de los anuncios existentes y genera vistas previas de los anuncios que quieras crear. Las vistas previas generadas se basan en el contenido del anuncio. En el caso de la vista previa del anuncio, debes proporcionar un identificador de acceso de usuario, no un identificador de acceso a la página. Por ejemplo, puedes obtener la vista previa del contenido de un anuncio existente:

curl -X GET \ -d 'ad_format="DESKTOP_FEED_STANDARD"' \ -d 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/v21.0/<CREATIVE_ID>/previews
'use strict'; const bizSdk = require('facebook-nodejs-business-sdk'); const AdCreative = bizSdk.AdCreative; const AdPreview = bizSdk.AdPreview; const access_token = '<ACCESS_TOKEN>'; const app_secret = '<APP_SECRET>'; const app_id = '<APP_ID>'; const id = '<AD_CREATIVE_ID>'; const api = bizSdk.FacebookAdsApi.init(access_token); const showDebugingInfo = true; // Setting this to true shows more debugging info. if (showDebugingInfo) { api.setDebug(true); } const logApiCallResult = (apiCallName, data) => { console.log(apiCallName); if (showDebugingInfo) { console.log('Data:' + JSON.stringify(data)); } }; let fields, params; fields = [ ]; params = { 'ad_format' : 'DESKTOP_FEED_STANDARD', }; const previewss = (new AdCreative(id)).getPreviews( fields, params ); logApiCallResult('previewss api call complete.', previewss);
require __DIR__ . '/vendor/autoload.php'; use FacebookAds\Object\AdCreative; use FacebookAds\Object\AdPreview; use FacebookAds\Api; use FacebookAds\Logger\CurlLogger; $access_token = '<ACCESS_TOKEN>'; $app_secret = '<APP_SECRET>'; $app_id = '<APP_ID>'; $id = '<AD_CREATIVE_ID>'; $api = Api::init($app_id, $app_secret, $access_token); $api->setLogger(new CurlLogger()); $fields = array( ); $params = array( 'ad_format' => 'DESKTOP_FEED_STANDARD', ); echo json_encode((new AdCreative($id))->getPreviews( $fields, $params )->getResponse()->getContent(), JSON_PRETTY_PRINT);
from facebook_business.adobjects.adcreative import AdCreative from facebook_business.adobjects.adpreview import AdPreview from facebook_business.api import FacebookAdsApi access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<AD_CREATIVE_ID>' FacebookAdsApi.init(access_token=access_token) fields = [ ] params = { 'ad_format': 'DESKTOP_FEED_STANDARD', } print AdCreative(id).get_previews( fields=fields, params=params, )
import com.facebook.ads.sdk.*; import java.io.File; import java.util.Arrays; public class SAMPLE_CODE_EXAMPLE { public static void main (String args[]) throws APIException { String access_token = \"<ACCESS_TOKEN>\"; String app_secret = \"<APP_SECRET>\"; String app_id = \"<APP_ID>\"; String id = \"<AD_CREATIVE_ID>\"; APIContext context = new APIContext(access_token).enableDebug(true); new AdCreative(id, context).getPreviews() .setAdFormat(AdPreview.EnumAdFormat.VALUE_DESKTOP_FEED_STANDARD) .execute(); } }
require 'facebook_ads' access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<AD_CREATIVE_ID>' FacebookAds.configure do |config| config.access_token = access_token config.app_secret = app_secret end ad_creative = FacebookAds::AdCreative.get(id) previewss = ad_creative.previews({ fields: { }, ad_format: 'DESKTOP_FEED_STANDARD', })

También puedes obtener la vista previa mediante las especificaciones de contenido de un anuncio de dominio para un sitio web externo:

curl -X GET \ -d 'creative="<CREATIVE_SPEC>"' \ -d 'ad_format="<AD_FORMAT>"' \ -d 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/v21.0/act_<AD_ACCOUNT_ID>/generatepreviews
'use strict'; const bizSdk = require('facebook-nodejs-business-sdk'); const AdAccount = bizSdk.AdAccount; const AdPreview = bizSdk.AdPreview; const access_token = '<ACCESS_TOKEN>'; const app_secret = '<APP_SECRET>'; const app_id = '<APP_ID>'; const id = '<AD_ACCOUNT_ID>'; const api = bizSdk.FacebookAdsApi.init(access_token); const showDebugingInfo = true; // Setting this to true shows more debugging info. if (showDebugingInfo) { api.setDebug(true); } const logApiCallResult = (apiCallName, data) => { console.log(apiCallName); if (showDebugingInfo) { console.log('Data:' + JSON.stringify(data)); } }; let fields, params; fields = [ ]; params = { 'creative' : '<adCreativeSpec>', 'ad_format' : '<adFormat>', }; const generatepreviewss = (new AdAccount(id)).getGeneratePreviews( fields, params ); logApiCallResult('generatepreviewss api call complete.', generatepreviewss);
require __DIR__ . '/vendor/autoload.php'; use FacebookAds\Object\AdAccount; use FacebookAds\Object\AdPreview; use FacebookAds\Api; use FacebookAds\Logger\CurlLogger; $access_token = '<ACCESS_TOKEN>'; $app_secret = '<APP_SECRET>'; $app_id = '<APP_ID>'; $id = '<AD_ACCOUNT_ID>'; $api = Api::init($app_id, $app_secret, $access_token); $api->setLogger(new CurlLogger()); $fields = array( ); $params = array( 'creative' => '<adCreativeSpec>', 'ad_format' => '<adFormat>', ); echo json_encode((new AdAccount($id))->getGeneratePreviews( $fields, $params )->getResponse()->getContent(), JSON_PRETTY_PRINT);
from facebook_business.adobjects.adaccount import AdAccount from facebook_business.adobjects.adpreview import AdPreview from facebook_business.api import FacebookAdsApi access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<AD_ACCOUNT_ID>' FacebookAdsApi.init(access_token=access_token) fields = [ ] params = { 'creative': '<adCreativeSpec>', 'ad_format': '<adFormat>', } print AdAccount(id).get_generate_previews( fields=fields, params=params, )
import com.facebook.ads.sdk.*; import java.io.File; import java.util.Arrays; public class SAMPLE_CODE_EXAMPLE { public static void main (String args[]) throws APIException { String access_token = \"<ACCESS_TOKEN>\"; String app_secret = \"<APP_SECRET>\"; String app_id = \"<APP_ID>\"; String id = \"<AD_ACCOUNT_ID>\"; APIContext context = new APIContext(access_token).enableDebug(true); new AdAccount(id, context).getGeneratePreviews() .setCreative( new AdCreative() ) .setAdFormat(AdPreview.EnumAdFormat.VALUE_<ADFORMAT>) .execute(); } }
require 'facebook_ads' access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<AD_ACCOUNT_ID>' FacebookAds.configure do |config| config.access_token = access_token config.app_secret = app_secret end ad_account = FacebookAds::AdAccount.get(id) generatepreviewss = ad_account.generatepreviews({ fields: { }, creative: '<adCreativeSpec>', ad_format: '<adFormat>', })

Generar vistas previas

Existen varias formas de generar una vista previa mediante los elementos que se incluyen a continuación:

Para usar el identificador de un anuncio existente, utiliza el parámetro previews de dicho anuncio.

https://graph.facebook.com/<API_VERSION>/<AD_ID>/previews

Para usar el identificador del contenido del anuncio existente, utiliza el parámetro previews de dicho contenido.

https://graph.facebook.com/<API_VERSION>/<AD_CREATIVE_ID>/previews

Para usar las especificaciones de contenido del anuncio, tienes dos opciones de extremo:

En el caso de los anuncios de catálogo de Advantage+, debes pasar el parámetro object_story_spec completo al extremo /generatepreviews y usar también el parámetro product_item_ids descrito en Anuncios de catálogo de Advantage+, Vista previa.

Las vistas previas de una cuenta publicitaria solo son visibles para los usuarios que tienen un rol en la cuenta. En cambio, las vistas previas generadas mediante el perímetro generatepreviews son visibles para cualquier usuario.

https://graph.facebook.com/API_VERSION>/act_<AD_ACCOUNT_ID>/generatepreviews
https://graph.facebook.com/API_VERSION>/generatepreviews

Cualquiera de los cuatro extremos señalados anteriormente devuelve un objeto de vista previa del anuncio.

Ejemplos

Crea una vista previa mediante 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

Crea una vista previa de un anuncio multiproducto mediante object_story_id. Para obtener el parámetro object_story_id, es necesario crear primero un anuncio multiproducto.

curl -X GET \ -d 'creative={ "object_story_id": "<PAGE_ID>_<POST_ID>" }' \ -d 'ad_format="DESKTOP_FEED_STANDARD"' \ -d 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/v21.0/act_<AD_ACCOUNT_ID>/generatepreviews
'use strict'; const bizSdk = require('facebook-nodejs-business-sdk'); const AdAccount = bizSdk.AdAccount; const AdPreview = bizSdk.AdPreview; const access_token = '<ACCESS_TOKEN>'; const app_secret = '<APP_SECRET>'; const app_id = '<APP_ID>'; const id = '<AD_ACCOUNT_ID>'; const api = bizSdk.FacebookAdsApi.init(access_token); const showDebugingInfo = true; // Setting this to true shows more debugging info. if (showDebugingInfo) { api.setDebug(true); } const logApiCallResult = (apiCallName, data) => { console.log(apiCallName); if (showDebugingInfo) { console.log('Data:' + JSON.stringify(data)); } }; let fields, params; fields = [ ]; params = { 'creative' : {'object_story_id':'<pageID>_<postID>'}, 'ad_format' : 'DESKTOP_FEED_STANDARD', }; const generatepreviewss = (new AdAccount(id)).getGeneratePreviews( fields, params ); logApiCallResult('generatepreviewss api call complete.', generatepreviewss);
require __DIR__ . '/vendor/autoload.php'; use FacebookAds\Object\AdAccount; use FacebookAds\Object\AdPreview; use FacebookAds\Api; use FacebookAds\Logger\CurlLogger; $access_token = '<ACCESS_TOKEN>'; $app_secret = '<APP_SECRET>'; $app_id = '<APP_ID>'; $id = '<AD_ACCOUNT_ID>'; $api = Api::init($app_id, $app_secret, $access_token); $api->setLogger(new CurlLogger()); $fields = array( ); $params = array( 'creative' => array('object_story_id' => '<pageID>_<postID>'), 'ad_format' => 'DESKTOP_FEED_STANDARD', ); echo json_encode((new AdAccount($id))->getGeneratePreviews( $fields, $params )->getResponse()->getContent(), JSON_PRETTY_PRINT);
from facebook_business.adobjects.adaccount import AdAccount from facebook_business.adobjects.adpreview import AdPreview from facebook_business.api import FacebookAdsApi access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<AD_ACCOUNT_ID>' FacebookAdsApi.init(access_token=access_token) fields = [ ] params = { 'creative': {'object_story_id':'<pageID>_<postID>'}, 'ad_format': 'DESKTOP_FEED_STANDARD', } print AdAccount(id).get_generate_previews( fields=fields, params=params, )
import com.facebook.ads.sdk.*; import java.io.File; import java.util.Arrays; public class SAMPLE_CODE_EXAMPLE { public static void main (String args[]) throws APIException { String access_token = \"<ACCESS_TOKEN>\"; String app_secret = \"<APP_SECRET>\"; String app_id = \"<APP_ID>\"; String id = \"<AD_ACCOUNT_ID>\"; APIContext context = new APIContext(access_token).enableDebug(true); new AdAccount(id, context).getGeneratePreviews() .setCreative( new AdCreative() .setFieldObjectStoryId(\"<pageID>_<postID>\") ) .setAdFormat(AdPreview.EnumAdFormat.VALUE_DESKTOP_FEED_STANDARD) .execute(); } }
require 'facebook_ads' access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<AD_ACCOUNT_ID>' FacebookAds.configure do |config| config.access_token = access_token config.app_secret = app_secret end ad_account = FacebookAds::AdAccount.get(id) generatepreviewss = ad_account.generatepreviews({ fields: { }, creative: {'object_story_id':'<pageID>_<postID>'}, ad_format: 'DESKTOP_FEED_STANDARD', })

Crea una vista previa de un anuncio sobre una aplicación mediante object_story_spec. Esta es la única forma de generar una vista previa de un anuncio sobre una aplicación.

curl -X GET \ -d '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/v21.0/act_<AD_ACCOUNT_ID>/generatepreviews
'use strict'; const bizSdk = require('facebook-nodejs-business-sdk'); const AdAccount = bizSdk.AdAccount; const AdPreview = bizSdk.AdPreview; const access_token = '<ACCESS_TOKEN>'; const app_secret = '<APP_SECRET>'; const app_id = '<APP_ID>'; const id = '<AD_ACCOUNT_ID>'; const api = bizSdk.FacebookAdsApi.init(access_token); const showDebugingInfo = true; // Setting this to true shows more debugging info. if (showDebugingInfo) { api.setDebug(true); } const logApiCallResult = (apiCallName, data) => { console.log(apiCallName); if (showDebugingInfo) { console.log('Data:' + JSON.stringify(data)); } }; let fields, params; fields = [ ]; params = { 'creative' : {'object_story_spec':{'link_data':{'call_to_action':{'type':'USE_APP','value':{'link':'<url>'}},'description':'Description','link':'<url>','message':'Message','name':'Name','picture':'<imageURL>'},'page_id':'<pageID>'}}, 'ad_format' : 'MOBILE_FEED_STANDARD', }; const generatepreviewss = (new AdAccount(id)).getGeneratePreviews( fields, params ); logApiCallResult('generatepreviewss api call complete.', generatepreviewss);
require __DIR__ . '/vendor/autoload.php'; use FacebookAds\Object\AdAccount; use FacebookAds\Object\AdPreview; use FacebookAds\Api; use FacebookAds\Logger\CurlLogger; $access_token = '<ACCESS_TOKEN>'; $app_secret = '<APP_SECRET>'; $app_id = '<APP_ID>'; $id = '<AD_ACCOUNT_ID>'; $api = Api::init($app_id, $app_secret, $access_token); $api->setLogger(new CurlLogger()); $fields = array( ); $params = array( 'creative' => array('object_story_spec' => array('link_data' => array('call_to_action' => array('type' => 'USE_APP','value' => array('link' => '<url>')),'description' => 'Description','link' => '<url>','message' => 'Message','name' => 'Name','picture' => '<imageURL>'),'page_id' => '<pageID>')), 'ad_format' => 'MOBILE_FEED_STANDARD', ); echo json_encode((new AdAccount($id))->getGeneratePreviews( $fields, $params )->getResponse()->getContent(), JSON_PRETTY_PRINT);
from facebook_business.adobjects.adaccount import AdAccount from facebook_business.adobjects.adpreview import AdPreview from facebook_business.api import FacebookAdsApi access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<AD_ACCOUNT_ID>' FacebookAdsApi.init(access_token=access_token) fields = [ ] params = { 'creative': {'object_story_spec':{'link_data':{'call_to_action':{'type':'USE_APP','value':{'link':'<url>'}},'description':'Description','link':'<url>','message':'Message','name':'Name','picture':'<imageURL>'},'page_id':'<pageID>'}}, 'ad_format': 'MOBILE_FEED_STANDARD', } print AdAccount(id).get_generate_previews( fields=fields, params=params, )
import com.facebook.ads.sdk.*; import java.io.File; import java.util.Arrays; public class SAMPLE_CODE_EXAMPLE { public static void main (String args[]) throws APIException { String access_token = \"<ACCESS_TOKEN>\"; String app_secret = \"<APP_SECRET>\"; String app_id = \"<APP_ID>\"; String id = \"<AD_ACCOUNT_ID>\"; APIContext context = new APIContext(access_token).enableDebug(true); new AdAccount(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>\") ) ) .setFieldDescription(\"Description\") .setFieldLink(\"<url>\") .setFieldMessage(\"Message\") .setFieldName(\"Name\") .setFieldPicture(\"<imageURL>\") ) .setFieldPageId(\"<pageID>\") ) ) .setAdFormat(AdPreview.EnumAdFormat.VALUE_MOBILE_FEED_STANDARD) .execute(); } }
require 'facebook_ads' access_token = '<ACCESS_TOKEN>' app_secret = '<APP_SECRET>' app_id = '<APP_ID>' id = '<AD_ACCOUNT_ID>' FacebookAds.configure do |config| config.access_token = access_token config.app_secret = app_secret end ad_account = FacebookAds::AdAccount.get(id) generatepreviewss = ad_account.generatepreviews({ fields: { }, creative: {'object_story_spec':{'link_data':{'call_to_action':{'type':'USE_APP','value':{'link':'<url>'}},'description':'Description','link':'<url>','message':'Message','name':'Name','picture':'<imageURL>'},'page_id':'<pageID>'}}, ad_format: 'MOBILE_FEED_STANDARD', })


Vistas previas de anuncios de la sección “Explorar” de Instagram mediante el formato de anuncio INSTAGRAM_EXPLORE_GRID_HOME

curl -X GET \
  -d 'ad_format="INSTAGRAM_EXPLORE_GRID_HOME"' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v21.0/<AD_ID>/previews

Esta operación devuelve algo similar a lo siguiente:

{
  "data": [
    {
      "body": "<iframe src=\"https://www.facebook.com/ads/api/preview_iframe.php?d=AQKuwYcWpyFgVKLORPWQi52_uTud4v8PpMoDtyBfntL65i0iFtgkiXWN5S4JMBhq-UMKQmvxXFexVxu-5l5Xbf4WWRP48sCAtn3ArQAXwbdrD5qH0EL2z34K-gAgYyENd80cOGAdhVreKGJZvPkLbjDS3iDkdqdNNJQ6yaAFTmUpaz__cjgmhVVCUW68wU3UOZwqlv376mkijYR57Sm2OlyES4U6ivMPNGDx4xnZEd5d8kWyagDD-lPbCaGEk0nnQF5mnyeV9pFqdByhq-IqN6n0ZhSWjCPXZQa84wu5GNQ70YR2w7QxEYoiWCgI2WP0Z2OPeUMiNOf9bhYB-TBZJZ7G6HylsOnzzII9FQ8-0K-b_Q&t=AQJws9t-TtIGrKoFtCM\" width=\"274\" height=\"213\" scrolling=\"yes\" style=\"border: none;\"></iframe>"
    }
  ]
}

Vistas previas de los anuncios en los resultados de la búsqueda de Instagram usando el formato de anuncio “INSTAGRAM_SEARCH_CHAIN”.

curl -X GET \
  -d 'ad_format="INSTAGRAM_SEARCH_CHAIN"' \
  -d 'access_token=<ACCESS_TOKEN>' \
  https://graph.facebook.com/v21.0/<AD_ID>/previews

Esta operación devuelve algo similar a lo siguiente:

{
  "data": [
    {
      "body": "<iframe src=\"https://www.facebook.com/ads/api/preview_iframe.php?d=AQKVMPdwuorP3mliXRaOi0TCSvsGRfucEzBTnB4jghArle84f8kBjvJmX3gmdjniUjohKA3GUppDZqljStZwxxRRxkQl9Y4R1o5wV4zRGE3xO3NHf1_qBbFM_uEIGAnAvptMWo_DLpbiIqIYFMjxbXNELzmZQsR0gnbBjaXM9i6gkI29dnHPqnm4xGvPxo2w8RWeXfWvmik2C96_2PrhrRhh4NKL3SOmFC9JDVsTp9Z6SYDlLVcLJWwpRKmciAZqEMOnMEFgepVTZ39yJ4ZiAMRo76RK9XNVGcornsUBtxI8cZHKtdW7nmj3ivq09_NGGUnFiJdJaPm-Mk-obM3K0QyOvgHKwnmLn7wvMiizJeXPEWAcSBa4DPUFLAO1mSuaKla0VQ6tzAM4BqFU9LJOG1-zZmPec7wKxQGDcrXoCOKfv2xkLyzECc-oDS0JJgvxxlo&t=AQI8ECKvkemIoVDaDrs\" width=\"274\" height=\"213\" scrolling=\"yes\" style=\"border: none;\"></iframe>"
    }
  ],
  "__www_request_id__": "AzCC2RoeSL0rMbSPTYDyDHa"
}