FQL流查询中的Facebook帖子展示次数为空 [英] Facebook post impressions are null in FQL stream query

查看:162
本文介绍了FQL流查询中的Facebook帖子展示次数为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据 FQL Stream文档,以下查询应该会在运行时返回展示次数计数经过验证的页面所有者,但它从来没有。我们让网页所有者直接在具有扩展权限(read_stream,read_insights)的图形API资源管理器中进行身份验证,但展示次数为始终为空。

According to the FQL Stream documentation the following query is supposed to return impression counts when run by an authenticated page owner, yet it never does. We have the page owner authenticating directly in the graph api explorer with extended permissions (read_stream, read_insights), but the impression counts are always null.

是否有人可以让这个工作?

Is anyone able to get this working?

SELECT post_id, actor_id, message, impressions FROM stream WHERE actor_id = {owned_page} and source_id = {owned_page}


推荐答案

我认为它在文档中丢失,但是您应该使用页面访问令牌进行此调用,而不是用户访问令牌,以使其正常工作。

I think its missing in the documentation, but you should make this call using the page access token instead of user access token to get it worked.

所以这里是步骤:

So here are the steps:


  1. 从用户获取以下权限,并获取用户access_token


  • manage_pages - 获取页面访问令牌

  • read_insights - 读取展示次数(如文档中所述)

  • read_stream - 对于当前会话用户可以查看的所有帖子



  • manage_pages - to get the page access token
  • read_insights - to read the impressions (as mentioned in the doc)
  • read_stream - for all posts that the current session user is able to view

使用该令牌,获取页面access_token 与t他打电话 -

Using that token, get the page access_token with the call-

/ {page-id}?fields = access_token

可选)查看我的答案此处,以延长这个页面访问令牌将永远不会过期。 (基本上避免一些步骤)

(optional) Check out my answer here to extend this page access token that will never expire. (Basically to avoid some steps)

使用页面访问令牌运行您的查询 -

Using the page access token, run your query-

SELECT post_id,actor_id,message,FROM FROM WHERE actor_id = {owned_pa​​ge}和source_id = {owned_pa​​ge}

这将获取结果中的印象(如果有的话)。

This will fetch you the impressions(if any) in the result.

希望有帮助!

这篇关于FQL流查询中的Facebook帖子展示次数为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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