Search code examples
facebookvideofacebook-graph-api

How can I download a video from Facebook using GraphAPI?


I want to download a video from facebook to the clients local drive. I saw a few browser plugins and Facebook apps that are able to that and I was wondering how it can be done using the GraphAPI or in any other way.


Solution

  • First, you get the Graph API object. If the object is public, it's simple, just get https://graph.facebook.com/10151651550011063. (Where the number is the object's ID, equal to the ?v=OBJECTID in the facebook video URL.)

    If the object is not public, you need a valid access_token, and the Graph API url becomes something like https://graph.facebook.com/10151651550011063?access_token=DFSDSGSFDGFGDSblabla

    Then, in the Graph API object, you'll find the video download link under source.