连接Facebookads库以使用Python使用Marketing API从Facebook提取数据时出现问题 [英] Problem with connect facebookads library for extract data from Facebook with Marketing API using Python

查看:59
本文介绍了连接Facebookads库以使用Python使用Marketing API从Facebook提取数据时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获取有关广告系列的信息.我从此代码开始获取广告系列名称.我收到此错误:

I want to get info about ad campaign. And I start from this code to get campaign name. and I get this error :

Traceback (most recent call last):
  File "C:/Users/win7/PycharmProjects/API_Facebook/dd.py", line 2, in <module>
    from facebookads.adobjects.adaccount import AdAccount
  File "C:\Users\win7\AppData\Local\Programs\Python\Python37-32\lib\site-packages\facebookads\adobjects\adaccount.py", line 1582
    def get_insights(self, fields=None, params=None, async=False, batch=None, pending=False):
                                                         ^
SyntaxError: invalid syntax
                                                     ^

可能是什么原因?如果需要,可以提供代码示例,如何获得有关广告系列的更多信息?点击此处查看图片:代码和错误

What is may be reason? and if you want, can give code examples how can I get more info about campaign? Click here to view image: code and error

推荐答案

他们更新并重命名了该库,现在它是

They updated and renamed the library, now it's facebook_ads and async argument was renamed to is_async

这篇关于连接Facebookads库以使用Python使用Marketing API从Facebook提取数据时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆