如何通过图形API获得分享故事的帖子ID [英] how to get to the post id of shared story with graph api
问题描述
我使用图形API获得了共享的故事。
在结果中,我有一些字段:
type:photo,
status_type:shared_story,
object_id:647332045296931
object_id是照片对象
我需要该照片的post_id。
如何获取从那个点开始,你可以使用图形API来发布ID?
谢谢
使用fql get page_story_id(请参阅:
或fql:
更新:
对于视频,与照片类型相比,可以更容易地从object_id中查找post_id。
正如你可以在屏幕截图中看到的,具有下划线的并行页面ID155483697799865和对象ID4320084459885等于post_id155483697799865_4320084459885:
让我们使用这些post_id访问故事页面(再次,将下划线替换为 / posts / ):
要澄清一点,我回答的是获取此对象id的原始post_id,而不是post_id的共享状态。
例如,我从可口可乐粉丝页面分享一个视频,对象ID 12345从我/ feed获取与对象ID 12345相同来自coca -cola / feed,它指向同一个视频。但是,post_id是不同的。我的答案是帮助您找出原始故事post_id(可口可乐上传视频),而不是共享的post_id(xxx共享可口可乐的视频)
干杯
I get shared story feed with graph api. In The result I have fields like : type": "photo", "status_type": "shared_story", "object_id": "647332045296931"
the object_id is the photo object. I need the post_id of that photo.
How can I get the post id with graph api from that point ?
Thanks
Using fql get page_story_id(Please refer to https://developers.facebook.com/docs/reference/fql/photo):
Retrieve the page_story_id details:
Access the exact page at www base facebook using this page_story_id(replace underscore with "/posts/"):
The post_id can get via https://graph.facebook.com/420619404634864/feed too:
Or fql:
Updates:
For video, it is easier compare with photo type to find post_id from object_id. As you can see on the screenshot, concate page id "155483697799865" and object id "4320084459885" with underscore is equal to post_id "155483697799865_4320084459885":
Let's visit the story page using these post_id(Again, replace underscore with "/posts/"):
To be clarify, what i answer is get original post_id for this object id, not post_id of share status.
For example, i share a video from coca-cola fan page, the object id 12345 get from "me/feed" is same with object id 12345 get from "coca-cola/feed", which point to the same video. However, the post_id is different. My answer is help you to find out original story post_id (coca-cola upload a video), not the shared post_id(xxx Shared coca-cola's video)
Cheers
这篇关于如何通过图形API获得分享故事的帖子ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!