简体   繁体   English

Facebook Graph API 和见解不起作用

[英]Facebook Graph API and Insights not working

I simply want to pull insight data for my company utilizing the Facebook Graph API.我只想使用 Facebook Graph API 为我的公司提取洞察数据。 I am testing using https://developers.facebook.com/tools/explorer .我正在使用https://developers.facebook.com/tools/explorer进行测试。

When I enter https://graph.facebook.com/MY_ID/insights?当我输入https://graph.facebook.com/MY_ID/insights? and an Access Token I would expect to see JSON data with such data as Page_Views .和访问令牌,我希望看到带有诸如Page_Views类的数据的 JSON 数据。 However I only see this:但是我只看到这个:

{
      "data": [
      ],
      "paging": {
        "previous": "https://graph.facebook.com/MY_ID/insights?format=json&since=1337268417&until=1337527617",
        "next": "https://graph.facebook.com/MY_ID/insights?format=json&since=1337786817&until=1338046017"
      }
}

Any suggestions on the URL or perhaps I shouldn't be using Graph API to view Page_Views?对 URL 有什么建议,或者我不应该使用 Graph API 查看 Page_Views?

From the Page object documentation , for the insights connection:页面对象文档中,对于insights连接:

Permissions: A valid access_token with read_insights permission for a user authorized to view the Page's insights权限:具有 read_insights 权限的有效 access_token,供授权查看页面见解的用户使用

In the explorer click the Get Access Token button, change to the "Extended Permissions" tab and check the "read_insights" box, then click the button and try again.在资源管理器中单击Get Access Token按钮,更改为“扩展权限”选项卡并选中“read_insights”框,然后单击按钮并重试。

对于可能遇到此问题的任何其他想要查看“页面”而不是 v2.4 中的用户的人,您可能需要在“获取令牌”字段中使用“获取页面令牌”,否则您可能会看到 ToddN锯

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM