如何从帖子ID构建Facebook帖子URL? [英] How to construct a Facebook post URL from the post id?
问题描述
Possible Duplicate:
How to construct a permalink for objects returned by Facebook's new Graph API?
Facebook开放图API允许进行公开搜索,例如
The Facebook open graph API allows a public search, e.g.
返回的结果可能是状态,视频,链接,照片(以及其他?).
The results returned may be statuses, videos, links, photos (and others?).
每个都有一个帖子ID,例如
Each has a post id, e.g.
100000973592583_149321401769498
我希望为该帖子构建一个URL.对于状态,这似乎可行:
I wish to construct a URL to the post. For statuses, this seems to work:
http://www.facebook.com /profile.php?id=100000973592583&v=wall&story_fbid=149321401769498
但是,对于链接(或视频或照片),该链接通常有效,但有时无效.例如,具有ID
However, for a link (or video or photo), that often works, but sometimes does not. For example, a link with id
45430244790_127287890653212
需要
有人有创建防弹链接的经验吗?是否有任何文档?
Does someone have experience creating bulletproof links? Are there any docs on it?
编辑:假设我也知道类型(视频,帖子,照片,链接,..)
Edit: Suppose I know the type as well (video, post, photo, link, ..)
推荐答案
以下是FQL:
SELECT permalink
FROM stream
WHERE post_id="45430244790_127287890653212"
将返回:
[
{
"permalink": "http://www.facebook.com/posted.php?id=45430244790&share_id=127287890653212&comments=1#s127287890653212"
}
]
这篇关于如何从帖子ID构建Facebook帖子URL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!