Facebook支付报告凭证问题

2024-04-25 14:05:33 发布

您现在位置:Python中文网/ 问答频道 /正文

我在通过Facebook API下载报告时遇到了一些障碍。在

来自文档https://developers.facebook.com/docs/payments/developer_reports_api/

#Example company access_token request

#Sample developer request for a daily detail report:
wget "https://paymentreports.facebook.com/234599349987627/report?
                                      date=2012-05-15&
                                      type=detail&
                                      access_token=234599349987627|aBc_dEFaEUZbqpatkrp8pbtwXyZ"

#The request above would return a file named 234599349987627_detail_2012-05-15.csv.zip.

但是,在我编写的python脚本中,使用urllib2获取所描述的文件:

^{pr2}$

我收到一个HTTP错误: {"error":{"message":"Access denied.: Access denied due to invalid credentials."}}

我知道我的company_idaccess_token是正确的,按照文档中描述的说明生成了它(没有错误)。wget同一个URL返回相同的HTTP错误。在

我是不是少了点什么?在


Tags: 文档httpsreportcomtokenhttpdeveloperfacebook
1条回答
网友
1楼 · 发布于 2024-04-25 14:05:33

自从facebook在开发者页面上声明:

Before you can proceed, you'll need to make sure that you've enabled an app for payments, including setting up a company to receive payments. Once you've done that, you'll find your company ID and secret on your Company Settings page.

查看此页here。在

相关问题 更多 >