图像应用下载卡片

注意:要将卡片关联到推文,请通过 POST accounts/:account_id/tweetPOST statuses/updatePOST accounts/:account_id/scheduled_tweets 端点,使用 card_uri 参数来完成。

GET accounts/:account_id/cards/image_app_download

检索与当前账号关联的部分或所有图像应用下载卡片详细信息。

此卡片属于我们的移动应用推广产品套装内容。

资源 URL

https://ads-api.twitter.com/10/accounts/:account_id/cards/image_app_download

参数

名称 说明
account_id
必需

所使用账号的标识符。出现在资源路径中,通常是所有广告商 API 请求的必要参数,不包含 GET accounts。指定账号必须与已验证的用户关联。

类型:string

示例:18ce54d4x5t

card_ids
可选

通过指定以逗号分隔的标识符列表,将响应范围限定至所需的图像应用下载卡片。最多可提供 200 个 ID。

类型:string

示例:59wiu

count
可选

指定每个不同请求尝试检索的记录数量。

类型:int

默认值:200
最小值、最大值:11000
cursor
可选

指定光标以获取下一页结果。参阅分页了解更多信息。

类型:string

示例:8x7v00oow

q
可选

可选查询,按 name 指定卡片范围。省略此参数可检索所有卡片。最大长度:80 个字符。

注意:执行不区分大小写的前缀匹配。

类型:string

示例:twitter

sort_by
可选

根据支持的属性,按升序或降序排序。参阅排序了解更多信息。

类型:string

示例:created_at-asc

with_deleted
可选

在请求中包含已删除的结果。

类型:boolean

默认值:false
可能值:truefalse
with_total_count
可选

包含 total_count 响应属性。

注意:不包含此参数和 cursor

注意:包含 total_count 的请求速率限制较低,目前设置为每 15 分钟 200 次。

类型:boolean

默认值:false
可能值:truefalse

请求示例

GET https://ads-api.twitter.com/10/accounts/18ce54d4x5t/cards/image_app_download?card_ids=59wiu

响应示例

{
  "request": {
    "params": {
      "card_type": "image_app_download",
      "card_ids": [
        "59wiu"
      ],
      "account_id": "18ce54d4x5t"
    }
  },
  "next_cursor": null,
  "data": [
    {
      "name": "image app download card",
      "googleplay_app_id": "com.twitter.android",
      "media_key": "3_917438348871983104",
      "image_display_height": "418",
      "id": "59wiu",
      "country_code": "US",
      "media_url": "https://pbs.twimg.com/media/DOxqHTWV4AAL7Bk.jpg",
      "created_at": "2018-01-27T00:40:39Z",
      "image_display_width": "800",
      "card_uri": "card://957050688416112640",
      "updated_at": "2018-01-27T00:40:39Z",
      "app_cta": "INSTALL",
      "deleted": false,
      "card_type": "IMAGE_APP_DOWNLOAD"
    }
  ]
}

GET accounts/:account_id/cards/image_app_download/:card_id

检索与当前账号关联的特定图像应用下载卡片。

此卡片属于我们的移动应用推广产品套装内容。

资源 URL

https://ads-api.twitter.com/10/accounts/:account_id/cards/image_app_download/:card_id

参数

名称 说明
account_id
必需

所使用账号的标识符。出现在资源路径中,通常是所有广告商 API 请求的必要参数,不包含 GET accounts。指定账号必须与已验证的用户关联。

类型:string

示例:18ce54d4x5t

card_id
必需

请求中对正在操作的图像应用下载卡片的引用。

类型:string

示例:59wiu

with_deleted
可选

在请求中包含已删除的结果。

类型:boolean

默认值:false
可能值:truefalse

请求示例

GET https://ads-api.twitter.com/10/accounts/18ce54d4x5t/cards/image_app_download/59wiu

响应示例

{
  "request": {
    "params": {
      "card_type": "image_app_download",
      "card_id": "59wiu",
      "account_id": "18ce54d4x5t"
    }
  },
  "data": {
    "name": "image app download card",
    "googleplay_app_id": "com.twitter.android",
    "media_key": "3_917438348871983104"
    "image_display_height": "418",
    "id": "59wiu",
    "country_code": "US",
    "media_url": "https://pbs.twimg.com/media/DOxqHTWV4AAL7Bk.jpg",
    "created_at": "2018-01-27T00:40:39Z",
    "image_display_width": "800",
    "card_uri": "card://957050688416112640",
    "updated_at": "2018-01-27T00:40:39Z",
    "app_cta": "INSTALL",
    "deleted": false,
    "card_type": "IMAGE_APP_DOWNLOAD"
  }
}

POST accounts/:account_id/cards/image_app_download

创建与当前账号关联的新图像应用下载卡片。

此卡片属于我们的移动应用推广产品套装内容。

资源 URL

https://ads-api.twitter.com/10/accounts/:account_id/cards/image_app_download

参数

名称 说明
account_id
必需

所使用账号的标识符。出现在资源路径中,通常是所有广告商 API 请求的必要参数,不包含 GET accounts。指定账号必须与已验证的用户关联。

类型:string

示例:18ce54d4x5t

media_key
必需

在本卡片中使用的图像媒体密钥。

注意:图像必须位于账号的媒体库

注意:图像最小宽度必须为 800 像素,且宽高比为 1:1 或 1.91:1(宽:高)。

类型:string

示例:3_1151345051104991073

name
必需

卡片名称。

类型:string

示例:image app download card

country_code
必需

出售应用的国家/地区 ISO 代码,长度为两个字母。

类型:string

示例:US

ipad_app_id
有时为必需

iPad 应用 ID。

注意:必须填写以下值之一:ipad_app_idiphone_app_idgoogleplay_app_id

注意:未指定时,将设置为 iphone_app_id 值(如提供)。

注意:此参数可从 Apple App Store URL 检索。

类型:long

示例:333903271

iphone_app_id
有时为必需

iPhone 应用 ID。

注意:必须填写以下值之一:ipad_app_idiphone_app_idgoogleplay_app_id

注意:此参数可从 Apple App Store URL 检索。

类型:long

示例:333903271

googleplay_app_id
有时为必需

Google Play 应用程序包名称。

注意:必须填写以下值之一:ipad_app_idiphone_app_idgoogleplay_app_id

类型:string

示例:com.twitter.android

app_cta
可选

卡片按钮的行动号召 (CTA) 文本。

类型:enum

可能值:BOOKCONNECTINSTALLOPENORDERPLAYSHOP

ipad_deep_link
可选

正在推广的 iPad 应用的深层链接。

注意:仅可在已提供 ipad_app_id 时使用。

注意:未指定时,将设置为 iphone_deep_link 值(如提供)。

类型:string

iphone_deep_link
可选

正在推广的 iPhone 应用的深层链接。

注意:仅可在已提供 iphone_app_id 时使用。

类型:string

googleplay_deep_link
可选

正在推广的 Android 应用的深层链接。

注意:仅可在已提供 googleplay_app_id 时使用。

类型:string

请求示例

POST https://ads-api.twitter.com/10/accounts/18ce54d4x5t/cards/image_app_download?media_key=3_931235896644460544&name=image app download card&country_code=US&googleplay_app_id=com.twitter.android

响应示例

{
  "data": {
    "name": "image app download card",
    "googleplay_app_id": "com.twitter.android",
    "media_key": "3_931235896644460544",
    "image_display_height": "418",
    "id": "59wiu",
    "country_code": "US",
    "media_url": "https://pbs.twimg.com/media/DOxqHTWV4AAL7Bk.jpg",
    "created_at": "2018-01-27T00:40:39Z",
    "image_display_width": "800",
    "card_uri": "card://957050688416112640",
    "updated_at": "2018-01-27T00:40:39Z",
    "app_cta": "INSTALL",
    "deleted": false,
    "card_type": "IMAGE_APP_DOWNLOAD"
  },
  "request": {
    "params": {
      "media_key": "3_931235896644460544",
      "name": "image app download card",
      "googleplay_app_id": "com.twitter.android",
      "image_display_height": "418",
      "account_id": "18ce54d4x5t",
      "country_code": "US",
      "media_url": "https://pbs.twimg.com/media/DOxqHTWV4AAL7Bk.jpg",
      "image_display_width": "800",
      "app_cta": "INSTALL",
      "card_type": "IMAGE_APP_DOWNLOAD"
    }
  }
}

PUT accounts/:account_id/cards/image_app_download/:card_id

更新属于当前账号的指定图像应用下载卡片。

此卡片属于我们的移动应用推广产品套装内容。

资源 URL

https://ads-api.twitter.com/10/accounts/:account_id/cards/image_app_download/:card_id

参数

名称 说明
account_id
必需

所使用账号的标识符。出现在资源路径中,通常是所有广告商 API 请求的必要参数,不包含 GET accounts。指定账号必须与已验证的用户关联。

类型:string

示例:18ce54d4x5t

card_id
必需

请求中对正在操作的图像应用下载卡片的引用。

类型:string

示例:4hudo

country_code
可选

出售应用的国家/地区 ISO 代码,长度为两个字母。

类型:string

示例:US

app_cta
可选

卡片按钮的行动号召 (CTA) 文本。

类型:enum

可能值:BOOKCONNECTINSTALLOPENORDERPLAYSHOP

ipad_app_id
可选

iPad 应用 ID。

注意:必须填写以下值之一:ipad_app_idiphone_app_idgoogleplay_app_id

注意iphone_app_id 已指定,而此参数未指定时,将设置 iPhone 应用值。

注意:此参数可从 Apple App Store URL 检索。

类型:long

示例:333903271

ipad_deep_link
可选

正在推广的 iPad 应用的深层链接。

注意:仅可在已提供 ipad_app_id 时使用。

注意iphone_deep_link 已指定,而此参数未指定时,将设置 iPhone 深度链接值。

类型:string

iphone_app_id
可选

iPhone 应用 ID。

注意:必须填写以下值之一:ipad_app_idiphone_app_idgoogleplay_app_id

注意:此参数可从 Apple App Store URL 检索。

类型:long

示例:333903271

iphone_deep_link
可选

正在推广的 iPhone 应用的深层链接。

注意:仅可在已提供 iphone_app_id 时使用。

类型:string

googleplay_app_id
可选

Google Play 应用程序包名称。

注意:必须填写以下值之一:ipad_app_idiphone_app_idgoogleplay_app_id

类型:string

示例:com.twitter.android

googleplay_deep_link
可选

正在推广的 Android 应用的深层链接。

注意:仅可在已提供 googleplay_app_id 时使用。

类型:string

media_key
可选

在本卡片中使用的图像媒体密钥。

注意:图像必须位于账号的媒体库

注意:图像最小宽度必须为 800 像素,且宽高比为 1:1 或 1.91:1(宽:高)。

类型:string

示例:3_1151345051104991073

name
可选

卡片名称。

类型:string

示例:image app download card

请求示例

PUT https://ads-api.twitter.com/10/accounts/18ce54d4x5t/cards/image_app_download/59wiu?media_key=3_917438348871983104

响应示例

{
  "data": {
    "name": "image app download card",
    "media_key": "3_917438348871983104",
    "image_display_height": "418",
    "id": "59wiu",
    "media_url": "https://pbs.twimg.com/media/DLtlUUfV4AArIgW.jpg",
    "created_at": "2018-01-27T00:40:39Z",
    "image_display_width": "800",
    "card_uri": "card://957050688416112640",
    "updated_at": "2018-01-27T00:40:39Z",
    "app_cta": "INSTALL",
    "deleted": false,
    "card_type": "IMAGE_APP_DOWNLOAD"
  },
  "request": {
    "params": {
      "media_key": "3_917438348871983104",
      "image_display_height": "418",
      "account_id": "18ce54d4x5t",
      "card_id": "59wiu",
      "media_url": "https://pbs.twimg.com/media/DLtlUUfV4AArIgW.jpg",
      "image_display_width": "800",
      "card_type": "IMAGE_APP_DOWNLOAD"
    }
  }
}

DELETE accounts/:account_id/cards/image_app_download/:card_id

永久删除属于当前账号的指定图像应用下载卡片。

注意:此操作为硬删除。删除后,将无法恢复删除的卡片。

此卡片属于我们的移动应用推广产品套装内容。

资源 URL

https://ads-api.twitter.com/10/accounts/:account_id/cards/image_app_download/:card_id

参数

名称 说明
account_id
必需

所使用账号的标识符。出现在资源路径中,通常是所有广告商 API 请求的必要参数,不包含 GET accounts。指定账号必须与已验证的用户关联。

类型:string

示例:18ce54d4x5t

card_id
必需

请求中对正在操作的图像应用下载卡片的引用。

类型:string

示例:4ca39

请求示例

DELETE https://ads-api.twitter.com/10/accounts/18ce54d4x5t/cards/image_app_download/4ca39

响应示例

{
  "data": {
    "name": "img",
    "id": "4ca39",
    "created_at": "2017-06-08T05:18:03Z",
    "updated_at": "2017-08-23T13:20:04Z",
    "deleted": true,
    "card_type": "IMAGE_APP_DOWNLOAD"
  },
  "request": {
    "params": {
      "card_id": "4ca39",
      "card_type": "image_app_download",
      "account_id": "18ce54d4x5t"
    }
  }
}