Posts that have tagged my Page don't show up with API call

前提是你 提交于 2020-01-03 08:48:51

问题


I have a Facebook Page created for my service here. The name of the page is Rowz.

There are some posts on the page by users who have tagged the Page in posts on their own walls. Those posts show up on the Rowz Page timeline. In the Graph API for Page there is a field 'tagged' which I assumed would get me these posts but the same doesn't work.

Is there a way to fetch those posts that have tagged Rowz in them?


回答1:


According to the documentation for page object in graph API, tagged connection gets you the required result:

name: tagged
description: The photos, videos, and posts in which the Page has been tagged.
permission: any valid access_token or user access_token.
returns: a heterogeneous array of Photo, Video or Post objects.

You can test it here using graph API explorer (using the page ID mentioned in the question): https://developers.facebook.com/tools/explorer/?method=GET&path=265813166783408%2Ftagged

It works fine for me.

You may also consider using FQL for it. Query stream_tag table using a query something like this:

SELECT post_id,actor_id FROM stream_tag WHERE target_id=265813166783408

After this, you can iterate over post_id and query stream table for message field.



来源:https://stackoverflow.com/questions/8741144/posts-that-have-tagged-my-page-dont-show-up-with-api-call

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!