Facebook Developers
DocsToolsSupportNewsApps
Log In
  • Social Plugins
  • Facebook Login
  • Open Graph
  • Facebook APIs
    • Graph API
    • FQL
    • Open Graph
    • Dialogs
    • Chat
    • Internationalization
    • Ads
  • Games
  • Payments
  • App Center
  • Promote Your App
  • iOS
  • Android
  • JavaScript
  • PHP
  • More SDKs
  • Best Practices
    • Batch Requests
    • Using ETags
  • Reference
    • Cost Per Action (CPA) Ads
    • Currencies
    • Introduction to Action Spec
    • Introduction to Sponsored Stories
    • Mobile App Install Ads
    • Optimized CPM
    • Real Time Bidded Exchange protocol
    • Sponsored Results
    • Thrift file for Real Time Bidded Exchange protocol
  • Specs
    • Conversion Specs
    • Creative Specs
    • Defining Action Specs
    • Targeting Specs
    • Tracking Specs
  • Advanced Targeting
    • Action Spec Targeting
    • Conversion pixels
    • Custom Audience targeting
    • Topic Targeting
    • ZIP Code Targeting
  • Queries
    • Action Estimate
    • Action Spec Ad Previews
    • Ad Statistics
    • Autocomplete Data
    • Broad Target Categories
    • Connection Objects
    • Conversion Stats
    • Keyword Stats
    • Partner Categories
    • Reach estimate
    • Targeting Description
  • Objects
    • Ad account
    • Ad account group
    • Ad campaign
    • Ad creative
    • Ad group
    • Ad image
    • Ad user

Ad creative

Facebook APIs › Ads › Ad creative

This document details the Ad Creative object. An Ad Creative object is an instance of a specific Creative Spec which is being used to define the creative of one or more Ad groups

For more details on Creative Specs and how they are used to control the contents of an Ad group please review the Creative Spec docs.

In this document when we refer to "Ad Creative" we mean an Ad Creative object specifically.

Connections

The adcreative object has no connections, but is a connection of the following objects:

  • adaccount
  • adgroup

The adcreative object has no connections, but makes use of the following objects:

  • adimage

Using Ad Creative objects

Ad Creatives can be created as part of an Ad Group or individually on their own. In either case the Ad Creative is then stored in the Creative Library of the account for use in other Ad Groups. The creative library provides a single location for managing Ad Creatives and using them in ads.

For information about incorporating an existing Ad Creative into an Ad Group, see adGroup.

For full details about allowed Ad Creatives, see the Advertising Guidelines.

If you add an Ad Creative that isn't unique, e.g. with the same Creative Spec as another Ad Creative, a new Ad Creative is not generated and the creative Id of the existing Ad Creative is returned.

Adding a new Ad Creative

For example, to create an Ad Creative for a Sponsored Story about a user using an application whose id is 195713270451234, you specify a request with the following Creative Spec:

curl --silent --location
 -F "type=25"
 -F "action_spec={'action.type':'app_use', 'application':195713270451234}"
 "https://graph.facebook.com/act_12345678/adcreatives?access_token=____"

The result will be an Ad Creative id as follows:

 {"id":6003338851234}

Updating creatives

To rename an Ad Creative in the creative library, or change its run status, use the ID of the Ad Creative. For example, to change the name of am Ad Creative with the ID of 6003321601234, you could specify the following:

 curl -d "name=newname" "https://graph.facebook.com/
 6003321601234?access_token=____"

The result will be the following form:

 true

In a similar way, you can use the run_status parameter (which is shown in the examples of retrieved Ad Creatives, above) to change an Ad Creative's run status to either deleted (status 3) or active (status 1). Changing an Ad Creative to deleted status requires that the Ad Creative is not used with a current Ad group.

Retrieve creatives for an account

To retrieve an account's Ad Creatives, specify the account number as act_AccountNumber. Then specify adcreatives as a connection to act_AccountNumber. Up to 1000 Ad Creatives can be retrieved in one call. For example, if you specify a request similar to the following:

 curl  "https://graph.facebook.com/act_368811234/adcreatives?
 access_token=___" 

The result will be of the form:

  {"data":
         [{
            "view_tag": "",
            "alt_view_tags": [
            ],
            "creative_id": 6003399311234,
            "type": 1,
            "title": "testing1",
            "body": "test for first campaign",
            "image_hash": "448e2b0ea4a2f7c48ec97ca34b0e1234",
            "link_url": "http://www.test.com",
            "name": "test1",
            "run_status": 1,
            "preview_url": "https://www.facebook.com/ads/api/
                creative_preview.php?cid=6003399310112",
            "count_current_adgroups": 1,
            "id": 6003399311234
          },
          {
            "type":27,
            "object_id":157735000934788,
            "auto_update":true,
            "name":"test2",
            "run_status":1,
            "preview_url":"http:\/\/www.facebook.com\/ads\/api\/creative_preview.php?   cid=6004196941662",
            "count_current_adgroups":1,
            "id":"6004196941662"
          }
     ...snip...
      ],
    "count": 28
 }

Note: The "creative_id" and "id" are identical. I.e. they are both the ID of the Ad Creative.

Retrieving data for specific creatives

You can retrieve an Ad Creative from an account's creative library. The creative ID is unique so you can specify a request similar to the following:

 https://graph.facebook.com/6003399310112?access_token=______

The result will be of the form:

 {
    "view_tag": "",
    "alt_view_tags": [
    ],
    "creative_id": 6003399311234,
    "type": 1,
    "title": "test",
    "body": "text",
    "image_hash": "448e2b0ea4a2f7c48ec97ca34b0ed8b8",
    "link_url": "http://www.test.com",
    "name": "july14test",
    "run_status": 1,
    "preview_url": "https://www.facebook.com/ads/api/
          creative_preview.php?cid=6003399311234",
    "count_current_adgroups": 1,
    "id": "6003399311234"
 } 

Note: The "creative_id" and "id" are identical. I.e. they are both the ID of the Ad Creative.

To retrieve the basic data for multiple Ad Creatives, specify their IDs as follows:

 curl  "https://graph.facebook.com?
 ids=600341701234,6003266539876&access_token=___" 

Title and Body Restrictions

The following rules apply to the title and body parameters:

  • Cannot start with punctuation
  • Cannot have duplicate consecutive punctuation characters with the exception of 3 periods...
  • Words cannot be greater than 20 characters in length
  • Only 2 consecutive 1 character words are allowed
  • Cannot consist entirely of capital letters
  • Double spacing is not allowed

Additionally, the following characters are not allowed:

  • IPA Symbols
  • Diacritical Marks
  • Superscript and Subscript characters with the exception of TM and SM
  • The following characters \^~_={}[]|<>

For general guidelines on Facebook advertising see here

Updated about 4 months ago
Facebook © 2013 · English (US)
AboutAdvertisingCareersPlatform PoliciesPrivacy Policy