def create_ad_place_page_set(params={}): page_id = get_page_with_locations_id_assured() page_set = AdPlacePageSet(parent_id=test_config.account_id) page_set.update({ AdPlacePageSet.Field.name: unique_name('Ad Place Page Set'), AdPlacePageSet.Field.parent_page: page_id, }) page_set.update(params) page_set.remote_create() # CannotDelete return page_set
# Policies [http://developers.facebook.com/policy/]. This copyright notice # shall be included in all copies or substantial portions of the software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER from examples.docs import fixtures from facebookads import test_config ad_account_id = test_config.account_id page_id = fixtures.get_page_with_locations_id_assured() # _DOC oncall [pruno] # _DOC open [ADPLACEPAGESET_CREATE] # _DOC vars [ad_account_id:s, page_id] from facebookads.objects import AdPlacePageSet ad_place_page_set = AdPlacePageSet(parent_id=ad_account_id) ad_place_page_set.update({ AdPlacePageSet.Field.name: 'Ad Place Page Set', AdPlacePageSet.Field.parent_page: page_id, }) ad_place_page_set.remote_create() # _DOC close [ADPLACEPAGESET_CREATE] # CannotDelete