1

我想从链接中检索 facebook id。我想知道的是我是否有所有可能的情况或/以及我是否可以有一个标准的方法来做到这一点:

如果有http://www.facebook.com/pages/ExchangeMyRooms/301768493253094 我可以从 URL 中检索 id

如果我有http://www.facebook.com/babelverse我会这样做: https ://graph.facebook.com/?ids=babelverse 我得到了 id

如果我有http://www.imdb.com/title/tt0117500/我会:https://graph.facebook.com/?ids=http://www.imdb.com/title/tt0117500/ 我得到身份证

结果应如下所示:

{
"babelverse": {
  "id": "177626422254171",
  "name": "Babelverse",
  "picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/372895_177626422254171_1480242829_s.jpg",
  "link": "http://www.facebook.com/babelverse",
  "likes": 957,
  ...

有没有办法进行类似的查询

SELECT id FROM idontknow WHERE link=mylink

非常感谢

4

2 回答 2

1

所以您只是在寻找 Graph API 调用的 FQL 等价物……?

https://developers.facebook.com/docs/reference/fql/object_url/

于 2012-07-27T12:05:50.617 回答
0

The page-id will be the trailing number after the seo name in the url

URL break down for pages with out Vanity URL.

facebook.com/pages/ | seo name ExchangeMyRooms/ | page-id 301768493253094

Try https://graph.facebook.com/?ids=301768493253094

Returns

{
  "id": "301768493253094", 
  "name": "ExchangeMyRooms", 
  "picture": "http://profile.ak.fbcdn.net/static-ak/rsrc.php/v2/yY/r/fmYdZvdquYb.png", 
  "link": "http://www.facebook.com/pages/ExchangeMyRooms/301768493253094", 
  "likes": 2, 
  "category": "Company", 
  "is_published": true, 
  "can_post": true, 
  "talking_about_count": 1
}
于 2012-07-26T19:12:47.727 回答