如何使用Facebook API将书籍读取到网站?

时间:2013-05-26 18:55:22

标签: javascript facebook api facebook-graph-api

我正在尝试使用Facebook的Graph API,但书籍部分却没有返回任何内容。

这是它在Facebook的Graph Explorer中返回的内容。

{
"data": [
]
}

无论如何,我想要做的就是阅读我想要阅读的书籍,以便在我的网站上显示名称和图像(书籍封面)。我需要什么样的剧本?

1 个答案:

答案 0 :(得分:3)

您需要/me/book.reads来电和user_actions.books权限。您还需要书籍部分中的书籍。

{
  "data": [
    {
      "id": "10101176585859437", 
      "from": {
        "name": "Philippe Harewood", 
        "id": "13608786"
      }, 
      "start_time": "2013-05-26T20:06:43+0000", 
      "publish_time": "2013-05-26T20:06:43+0000", 
      "application": {
        "name": "Books", 
        "id": "174275722710475"
      }, 
      "data": {
        "book": {
          "id": "109248589093974", 
          "url": "https://www.facebook.com/pages/The-Bourne-Ultimatum/109248589093974", 
          "type": "books.book", 
          "title": "The Bourne Ultimatum"
        }
      }, 
      "type": "books.reads", 
      "no_feed_story": false, 
      "likes": {
        "count": 0, 
        "can_like": true, 
        "user_likes": false
      }, 
      "comments": {
        "count": 0, 
        "can_comment": true, 
        "comment_order": "chronological"
      }
    },