2014-04-06 65 views
4

我想从一个时间表后一个Facebook video对象:从Facebook时间线后获取视频对象(或视频ID)

  1. 我越来越从图形API /我的/ home
  2. 职位
  3. 我可以轻松地获得通过返回的OBJECT_ID
  4. 问题照片对象有用于视频后期型

    { 
        "id": "750834774_10152138100019775", 
        "from": { 
         "id": "750834774", 
         "name": "Emilie Volpi" 
        }, 
        "message": "haha le monde qui fait une analyse geopolitique de games of thrones^^ une bonne manière de se remettre à jour pour la nouvelle saison demain !!!!!", 
        "picture": "https://fbexternal-a.akamaihd.net/safe_image.php?d=AQCclQTe2bPMIcrY&w=130&h=130&url=http%3A%2F%2Fs2.dmcdn.net%2FEHFV4%2F526x297-mO8.jpg", 
        "link": "http://www.dailymotion.com/video/x1lu3ke_game-of-thrones-comprendre-la-crise-a-westeros-en-4-minutes_news", 
        "source": "http://www.dailymotion.com/swf/video/x1lu3ke?autoPlay=1", 
        "name": "« Game of Thrones » : comprendre la crise à Westeros en 4 minutes", 
        "caption": "www.dailymotion.com", 
        "description": "Guerre des cinq rois, pression des marcheurs blancs et des sauvageons au nord, retour des dragons à l’est… le Royaume des Sept couronnes est plongée dans une crise politique sanglante depuis plus d’un an. Le Monde vous propose un décryptage de la crise en quatre minutes mais attention… spoilers !", 
        "icon": "https://fbstatic-a.akamaihd.net/rsrc.php/v2/yj/r/v2OnaTyTQZE.gif", 
        "actions": [ 
         { 
         "name": "Comment", 
         "link": "https://www.facebook.com/750834774/posts/10152138100019775" 
         }, 
         { 
         "name": "Like", 
         "link": "https://www.facebook.com/750834774/posts/10152138100019775" 
         } 
        ], 
        "privacy": { 
         "value": "" 
        }, 
        "type": "video", 
        "status_type": "shared_story", 
        "application": { 
        "name": "Links", 
        "id": "2309869772" 
    }, 
    "created_time": "2014-04-06T09:39:57+0000", 
    "updated_time": "2014-04-06T09:39:57+0000", 
    "likes": { 
        "data": [ 
         { 
         "id": "1283687218", 
         "name": "Max Imus" 
         } 
        ], 
        "paging": { 
         "cursors": { 
          "after": "MTI4MzY4NzIxOA==", 
          "before": "MTI4MzY4NzIxOA==" 
         } 
        } 
        } 
    }, 
    
没有价值的object_id

正如你可以看到有没有视频ID,所以我不能让视频

我的目标是检索来自video对象embed_html

请告诉我该怎么做(图API或FQL查询)

回答

1

我想你只能得到实际上托管在Facebook上的视频的embed_html。您正在使用的示例托管在dailymotion上,并且仅在帖子中引用。这是主要区别。

我想你可以使用下面的FQL得到嵌入视频网址:

select attachment.media.video.source_url from stream where post_id='750834774_10152138100019775' 

然后,您可以dynmically包括在您的网页,如果你通过SOURCE_URL内容的iframe,例如

src属性
+0

你可能是对的,我相信Facebook也拥有所有共享视频的embed_html。我不需要再次检索source_url,因为我已经得到了它:)问题是我尝试在Android上下文中,并且WebView并不总是读取source_url(flash ...) –

+0

那么,我认为它不是真的有可能你想在这里实现... – Tobi