本文整理汇总了Python中facebookads.objects.AdAccount.get_ad_users方法的典型用法代码示例。如果您正苦于以下问题:Python AdAccount.get_ad_users方法的具体用法?Python AdAccount.get_ad_users怎么用?Python AdAccount.get_ad_users使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类facebookads.objects.AdAccount
的用法示例。
在下文中一共展示了AdAccount.get_ad_users方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: AdAccount
# 需要导入模块: from facebookads.objects import AdAccount [as 别名]
# 或者: from facebookads.objects.AdAccount import get_ad_users [as 别名]
# _DOC vars [account_id:s]
from facebookads.objects import AdAccount
account = AdAccount(account_id)
objects = account.get_connection_objects()
for obj in objects:
print(obj[AdAccount.Field.name])
# _DOC close [ADACCOUNT_GET_CONNECTION_OBJECTS]
# _DOC open [ADACCOUNT_GET_ADUSERS]
# _DOC vars [account_id:s]
from facebookads.objects import AdAccount, AdUser
account = AdAccount(account_id)
users = account.get_ad_users()
for user in users:
print(user[AdUser.Field.id])
# _DOC close [ADACCOUNT_GET_ADUSERS]
# _DOC open [ADACCOUNT_READ_TOS_ACCEPTED]
# _DOC vars [account_id:s]
from facebookads.objects import AdAccount
account = AdAccount(account_id)
account.remote_read(fields=[AdAccount.Field.tos_accepted])
for tos in account[AdAccount.Field.tos_accepted]:
print(tos)
# _DOC close [ADACCOUNT_READ_TOS_ACCEPTED]