为了使用Facebook的营销API,我需要一个可公开访问的网络服务器吗? [英] Do I need a publicly accessible webserver in order to user Facebook's marketing API?
问题描述
在快速入门指南的某一点上,创建新的Facebook应用程序时,您可以插入一个应该是你的网站。
我没有网站,但我只是想从本地的电脑使用python调用Facebook API。这是可能吗?
编辑:所以这是什么让我感到困惑:
提供你的应用/网站的网址,例如
http:// localhost / my-marketing-api-app / 。
Localhost?如果我的PC上本地运行,我需要提供我的应用程序或网站的URL?是否需要一个URL或者是对该URL进行某种安全检查?
我也是新来使用Facebook营销API为我的公司创建仪表板。我绝对不是专家,但希望我的经验可能对你有用。
我在Jupyter上使用Python 2.7进行我的Facebook Marketing API调用,并按照第7点(初始化营销API SDK)和8(获取广告帐户)从以下链接:
https://developers.facebook.com/docs/marketing-api/quickstart#init-sdk
我的代码开始是完全一样的作为点7& 8,当然,我不得不更改信息以适应我的帐户信息,我从一个单独的文件加载。 API调用结果在json中,所以我做了更多的处理,将它们转换为熊猫数据帧,然后将其保存为csv文件。
Maybe I'm misunderstanding something. I asked a question before about a problem I'm having accessing the Facebook Ads API with python. Using the same token works fine in the graph app.
At one point in the quick start guide, when creating a new facebook app, you plug in a URL of what is supposed to be your website.
I don't have a website though I just want to call the Facebook API from my local PC with python. Is this possible?
Edit: so this is what confuses me:
Provide the Site URL of your app/website, e.g. http://localhost/my-marketing-api-app/.
Localhost? Why do I need to provide a URL of my app or website if its running locally on my PC? Does it require a URL or does it do some kind of security check against that URL?
I am also new to using the Facebook Marketing API to create dashboards for my firm. I am definitely not an expert, but hope my experience may be of use to you.
I am using Python 2.7 on Jupyter to do my Facebook Marketing API calls, and I followed points 7 (Initialize Marketing API SDK) and 8 (Get Ad Account) from the following link:
https://developers.facebook.com/docs/marketing-api/quickstart#init-sdk
The start of my codes are exactly the same as points 7 & 8, just that of course, I had to change the information to fit my account information, which I loaded from a separate file. The API call results are in json, so I did more processing to convert them into Panda dataframes, which I then save out as csv files.
这篇关于为了使用Facebook的营销API,我需要一个可公开访问的网络服务器吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!