Marketing API Version

ExternalTags

Provides operations to create, read, update and delete ExternalTags.

Read ExternalTags

Permissions

A user access token with Atlas API capability is required to request externaltags details.

Fields

Reading this endpoint returns a single or an array of ExternalTag objects with the same fields as the node.

Read ExternalTag

You can get details of the external tags by making an HTTP GET request.

An example of the request and response:

Request:

https://graph.facebook.com/<API_VERSION>/<EXTERNAL_TAG_ID>

Response:

{
  "advertiser_id": "11002200631100", 
  "body": "<script>Test Script</script>", 
  "created_date": "2015-02-10T19:28:45+0000", 
  "id": "11002200680000", 
  "is_active": true, 
  "last_modified_date": "2015-02-10T19:28:45+0000", 
  "name": "TestExternalTag", 
  "staging_body": "", 
  "vendor": "Atlas", 
  "version": "1"
}

Curl Example:

A curl example to get external tag details:

curl -G \
  -d 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/<API_VERSION>/<EXTERNAL_TAG_ID>

Create ExternalTags

Permissions

A user access token with Atlas API capability is required to create or update external tag details.

Fields

Publishing this endpoint returns a single or an array of ExternalTag objects.

Create ExternalTag

You can create externaltag for an advertiser by making an HTTP POST request. It will update the externaltag if it already exists.

An example of the request and response:

Request:

https://graph.facebook.com/<API_VERSION>/<ADVERTISER_ID>/external_tags?external_tags=[{ "name" : "TestExternalTag", "vendor" : "Atlas",  "staging_body" : "",  "body" : "<script>Test Script</script> "  }]

Response:

{
  "data": [
    {
      "id": "11002200680000",
      "success": true
    }
  ]
}

Curl Example

A curl example to create externaltag for an advertiser:


curl \ -F 'external_tags=[{ "name" : "TestExternalTag", "vendor" : "Atlas", "staging_body" : "", "body" : "<script>Test Script</script> " }]' \ -F 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/v2.0/<ADVERTISER_ID>/external_tags

Delete ExternalTags

Permissions

A user access token with Atlas API capability is required to delete externaltags.

Delete ExternalTag

You can delete an externaltag by making an HTTP DELETE request.

An example of the request and response:

Request:

https://graph.facebook.com/<API_VERSION>/<EXTERNAL_TAG_ID>

Response:

{
  "success": true
}

Curl Example

A curl example to delete externaltags:

curl -XDELETE \
  -F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/<API_VERSION>/<EXTERNAL_TAG_ID>