简体   繁体   English

登录网站后,有什么方法可以获取用户喜欢的Facebook图书的照片吗?

[英]Is there any way to get the photo of the books that a user likes on facebook after loging in on website?

So I managed to implement the user login facebook button on my website, and successfully get the books that the user likes on his personal facebook page, but this returns only the ID of the book and the name. 因此,我设法在我的网站上实现了用户登录facebook按钮,并成功在其个人facebook页面上获得了用户喜欢的书籍,但这仅返回书籍的ID和名称。

I was wondering if there is any way I could get more info about the object, like : what type of book is it ( SF, Action, For kids etc... ) or at least a photo for it, if there is any on facebook for it. 我想知道是否有什么办法可以获取有关该对象的更多信息,例如:它是什么类型的书(SF,Action,For kids等...),或者至少有一张照片,如果有的话Facebook的。

Any ideas on how I can manage to do this? 关于如何能够做到这一点的任何想法?

As a side note ( dunno if it will give any ideas for you guys ), I'm making an e-commerce website that after you login with your facebook account on the website I want to recommend those books that you liked/read on facebook, but I can only do that if I know them, and if the website doesn't have them I would like to make a new db entry with them, that's why I want to get more details about the item ( photo, gender etc.. ) The same I would like to apply even for movies and Songs. 作为旁注(不知道您是否会给您提供任何想法),我正在建立一个电子商务网站,当您在网站上使用Facebook帐户登录后,我想向您推荐您喜欢/在facebook上阅读的那些书,但是只有在我认识他们的情况下,我才能这样做,并且如果网站上没有他们,我想与他们建立一个新的数据库条目,这就是为什么我想要获得有关该项目的更多详细信息(照片,性别等)的原因。 。)即使是电影和歌曲,我也想申请。

Any ideas will be appreciated. 任何想法将不胜感激。

if you make a query with me/books , or v2.0/user_id/books , here's a sample result: 如果您通过me/booksv2.0/user_id/books ,则结果示例如下:

       {
      "category": "Book", 
      "name": "Atharva Veda", 
      "created_time": "2012-01-22T16:27:00+0000", 
      "id": "111018182244878"
    }, 
    {
      "category": "Book", 
      "name": "Petronius' Satyricon", 
      "created_time": "2012-01-22T16:24:45+0000", 
      "id": "107943872570178"
    }, 
    {
      "category": "Book", 
      "name": "De Brevitate Vitae", 
      "created_time": "2012-01-22T16:24:44+0000", 
      "id": "108092199212156"
    }, 
{
      "category": "Book", 
      "name": "Myth of Faraway Winds, an Ebook by Sarah S. Vati", 
      "created_time": "2012-08-20T23:26:20+0000", 
      "id": "390942770973133"
    },

The category is, unfortunately, just "book" (I also see community pages or interests in the list of my books), but you have the book title. 不幸的是,类别只是“书”(我的书列表中也看到社区页面或兴趣爱好),但是您拥有书名。 You can get a description with the book id, ie, v2.0/book_id . 您可以获得带有书号的描述,即v2.0/book_id If we want info about the book with id 390942770973133, we call the url v2.0/390942770973133 , and here's the result: 如果我们想要有关ID为390942770973133的书的信息,我们将其称为url v2.0/390942770973133 ,结果如下:

   {
  "id": "390942770973133", 
  "about": "Myth of Faraway Winds is a special issue of Sarasvati Gallery's Art Catalogues, featuring the event \"Sarasvati Gallery in Atessa (Abruzzo, Italy)\".", 
  "can_post": true, 
  "category": "Book", 
  "checkins": 0, 
  "description": "Myth of Faraway Winds is a special issue of Sarasvati Gallery's Art Catalogues, featuring the event \"Sarasvati Gallery in Atessa (Abruzzo, Italy)\".", 
  "has_added_app": false, 
  "is_community_page": false, 
  "is_published": true, 
  "likes": 2, 
  "link": "http://www.smashwords.com/books/view/217352", 
  "name": "Myth of Faraway Winds, an Ebook by Sarah S. Vati", 
  "parking": {
    "lot": 0, 
    "street": 0, 
    "valet": 0
  }, 
  "talking_about_count": 0, 
  "were_here_count": 0
}e_count": 0
    }

You get the book cover at the following url: https://graph.facebook.com/BOOK_ID/picture , so, for the book above, it would be https://graph.facebook.com/390942770973133/picture (that's not a query, it's the url that redirects to the book picture. Put it in your browser to see it). 您可以从以下URL获得书的封面: https://graph.facebook.com/BOOK_ID/picture : https://graph.facebook.com/BOOK_ID/picture ,因此,对于上述书,书的封面为https://graph.facebook.com/390942770973133/picture (不是一个查询,它是重定向到书本图片的网址。将其放在浏览器中即可查看)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM