如何阅读观看的电影到ios应用程序

时间:2013-07-13 11:32:18

标签: ios objective-c facebook facebook-graph-api

我正在编写一个Facebook原生iOS应用程序,我想阅读登录用户选择“观看”的电影。

我能够获得用户喜欢使用我/电影的电影但是我是否正确我需要让我/ video.watches获取用户观看的电影?

我试过这个,但似乎没有得到这些信息。我已经为我的Facebook应用程序提供了以下权限:user_likes,user_videos,publish_actions,user_actions.video。

是否也可以获得Facebook所拥有的电影的一般列表,而不是特定于用户个人资料的电影列表?

1 个答案:

答案 0 :(得分:0)

是的,你是对的,me/video.watches对于电影应用的app_id_filter=475761232465217是正确的。所需权限为user_actions.video。您可能希望确保在Facebook UI中列出实际电影

Movies Watched

{
  "data": [
    {
      "id": "10101180827703747", 
      "from": {
        "name": "Philippe Harewood", 
        "id": "13608786"
      }, 
      "start_time": "2013-05-30T13:01:00+0000", 
      "end_time": "2013-05-30T13:01:00+0000", 
      "publish_time": "2013-05-30T13:01:00+0000", 
      "application": {
        "name": "Movies", 
        "id": "475761232465217"
      }, 
      "data": {
        "movie": {
          "id": "103744862998017", 
          "url": "https://www.facebook.com/pages/The-Bourne-Identity/103744862998017", 
          "type": "video.movie", 
          "title": "The Bourne Identity"
        }
      }, 
      "type": "video.watches", 
      "no_feed_story": false, 
      "likes": {
        "count": 0, 
        "can_like": true, 
        "user_likes": false
      }, 
      "comments": {
        "count": 0, 
        "can_comment": true, 
        "comment_order": "chronological"
      }
    }, 
    {
      "id": "10101137804098397", 
      "from": {
        "name": "Philippe Harewood", 
        "id": "13608786"
      }, 
      "start_time": "2013-04-15T22:22:26+0000", 
      "end_time": "2013-04-15T22:22:26+0000", 
      "publish_time": "2013-04-15T22:22:26+0000", 
      "application": {
        "name": "Movies", 
        "id": "475761232465217"
      }, 
      "data": {
        "movie": {
          "id": "151523671552341", 
          "url": "https://www.facebook.com/CasinoRoyaleMovie", 
          "type": "video.movie", 
          "title": "Casino Royale"
        }
      }, 
      "type": "video.watches", 
      "no_feed_story": false, 
      "likes": {
        "count": 0, 
        "can_like": true, 
        "user_likes": false
      }, 
      "comments": {
        "count": 0, 
        "can_comment": true, 
        "comment_order": "chronological"
      }
    }
  ], 
  "paging": {
    "next": "https://graph.facebook.com/13608786/video.watches?app_id_filter=475761232465217&limit=25&offset=25&__after_id=10101137804098397"
  }
}