2

I'm trying to write a script on one of our backend servers that will run on an automated basis, log in to Facebook, and retrieve the leads from the Facebook Lead Ads api. I'm using the guide published here:

https://developers.facebook.com/docs/marketing-api/guides/lead-ads/leads/v2.6

The difficulty I'm having is that in order to fetch the leads, the script will need the manage_pages permission. I attempted to apply for this by creating an "app" in Facebook's Developer interface, and by requesting approval for the manage_pages permission, but my request was denied because the screencast didn't show how the "app" worked, and they weren't able to see a clear method to "log in".

Since this script will never be seen or accessed by end-users, and the login process is being handled entirely by the server-side script, I'm not sure how to go about getting approval for this. We're not using Facebook API's in any other way right now and we don't have any plans for writing user-facing apps. The documentation and examples on Facebook's site all seem geared toward people who are writing user-facing apps and it's not clear how to proceed in our case.

Is there a best practice for getting approval for permissions on server-side-only apps that use Facebook APIs? Or is this something that people just don't do?

4

2 回答 2

0

您也可以获得“扩展访问令牌”。

https://developers.facebook.com/tools-and-support/上生成一个令牌。在https://developers.facebook.com/tools/debug/accesstoken/上粘贴令牌,然后单击“扩展访问令牌”。此令牌将在接下来的 60 天内有效。

于 2017-07-31T19:19:21.213 回答
0

假设您在生成潜在客户的页面上具有管理员权限,您只需生成具有 manage_pages 和 ads_management 权限的访问令牌并使用此令牌来检索潜在客户。

即使您用于进行 api 调用的应用程序没有这些权限,您也可以生成具有上述范围的访问令牌。

尝试使用 Graph API Explorer 进行测试 - https://developers.facebook.com/tools/explore

从下拉列表中选择您创建的任何广告 API 应用程序,然后单击生成使用令牌按钮。在生成令牌时选中 ads_management 和 manage_pages 复选框,然后使用它来查询 /leads 的 /leads。

于 2017-05-16T19:26:40.897 回答