Request to promote iOS App in Facebook via Marketing API

我是研究僧i 提交于 2019-12-10 04:24:37

问题


I have the facebook application with approved ads_read, manage_pages ads_management, business_management and Ads Management Standard Access permissions.
I can create Ad campaign, ad set and can upload asset to Facebook via Facebook Marketing API.

I create ad set with such parameters:

{
      name: 'adset_name',
      campaign_id: '<campaign_id>',
      lifetime_spend_cap: 11000,
      promoted_object: {
        application_id: '<fb_app_id>',
        object_store_url: 'https://itunes.apple.com/app/<my_app>',
        page_id: '<page_id>',
      },
      billing_event: 'IMPRESSIONS',
      optimization_goal: 'APP_INSTALLS',
      bid_amount: 20000,
      targeting: {
        age_min: 20,
        age_max: 25,
        genders: [1],
        locales: [6],
         user_os: ['iOS_ver_11.0_and_above'],
        geo_locations: {
          countries: ["US"],
        },
        excluded_geo_locations: {
          countries: ["GB"],
        },
        publisher_platforms: 'facebook',
        facebook_positions: ['feed'],
      },
      device_platforms: 'mobile',
      pacing_type: 'standard',
      status: 'PAUSED',
      end_time: '2019-07-30 23:59:59-07:00',
    };

I create ad creative with such fields:

{
    object_type: 'APPLICATION',
    status: 'ACTIVE',
    name: 'hello',
    title: 'foo',
    object_story_spec: {
      page_id: '<facebook page id associated with app>',
      photo_data: {
        image_hash: asset_hash,
        caption: 'Just image',
      },
    },
    application_id: '<app store app id>',
    object_store_url: 'https://itunes.apple.com/app/<my app same as application_id>',
  }

The problem is, when I try to create ad with parameters:

{
    name: 'Heyyy',
    campaign_id,
    adset_id,
    creative: {
      creative_id,
    },
    status: 'PAUSED',
 }

I got error

Object Store URL does not match promoted object: Please ensure that the object store URL associated with your ad creative matches the object store URL set on your promoted object.

If I look to my Facebook business manager -> Ads manager, I see created ad set which is linked to app, page and iOS application.
Everything looks like if I create ad set by my own, not script.
So, I'm pretty sure that ad set creates correctly.
But I can't figure out how to create ad creative to make it work.

I have this problem for 2 weeks from now, and here is my question about ad creative error.

P.S. Here is links to my questions on facebook community forum, if it could help to clear the situation link, link, link, link


回答1:


8 days past, and I finally found out how to make it.
You can find info on this link
And now my AD Creative params looks like this:

{
    object_type: 'APPLICATION',
    status: 'ACTIVE',
    name: 'hello',
    title: 'foo',
    object_story_spec: {
      page_id: '<fb_page_id>',
      link_data: {
        call_to_action: {
          type: 'INSTALL_MOBILE_APP',
          value: {
            link: 'https://itunes.apple.com/app/<app>',
          },
        },
        image_hash: 'image hash',
        link: 'https://itunes.apple.com/app/<app>',
        message: 'Message',
      },
    },
  }


来源:https://stackoverflow.com/questions/56446925/request-to-promote-ios-app-in-facebook-via-marketing-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!