Push API \ Upload Video On Facebook PHP SDK

Resource/URI @Facebook GET POST PUT DELETE
Publish Post On Facebook /push/identities/<identity_token>/facebook/post.json Publish
Post
Upload Picture To Facebook /push/identities/<identity_token>/facebook/picture.json Upload
Picture
Upload Video To Facebook /push/identities/<identity_token>/facebook/video.json Upload
Video
Resource/URI @LinkedIn GET POST PUT DELETE
Publish Post On LinkedIn /push/identities/<identity_token>/linkedin/post.json Publish
Post
Resource/URI @Twitter GET POST PUT DELETE
Publish Tweet On Twitter /push/identities/<identity_token>/twitter/post.json Publish
Tweet
Upload Picture To Twitter /push/identities/<identity_token>/twitter/picture.json Upload
Picture

Workflow

Request: the code to send to the API

Send a POST request with the data below to the endpoint /push/identities/<identity_token>/facebook/video.json to upload a video to the Facebook account of a user. The <identity_token> is obtained whenever one of your users connects using a social network account.

To be able to use this endpoint Facebook must be fully configured for your OneAll Site and the user must have given consent to publish content on his behalf when he logged in with Facebook.

POST data to include in the request

{
  "request":{
    "push":{
      "picture":{
        "url": "#url#",
        "description": "#description#",        
        "create_post": #create_post#
      }
    }
  }
}
	
Key Description
* #url# The URL of the video to upload. The allowed formats are 3g2, 3gp, 3gpp, asf, avi, dat, divx, dv, f4v, flv, gif, m2ts, m4v, mkv, mod, mov, mp4, mpe, mpeg, mpeg4, mpg, mts, nsv, ogm, ogv, qt, tod, ts, vob, and wmv.
Example: http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4
#description# A description of the video.
Example: Sample Video
#create_post# Boolean flag, defaults to true.
If set to true, the video is uploaded and displayed in a new post on the user's timeline.
If set to false, the video is uploaded but no post is being created.
Example: false

Result: the code returned by the API

Resultset Example

{
  "response":{
    "request":{
      "date": "Thu, 21 Sep 2017 16:25:31  0200",
      "resource": "/push/identities/923843ec-1749-4cc1-988f-d6963f3b1baa/facebook/picture.json",
      "status":{
        "flag": "success",
        "code": 200,
        "info": "Your request has been processed successfully"
      }
    },
    "result":{
      "data":{
        "provider": "facebook",
        "object": "video",
        "video_id": "12345678901234567",
        "video_location": "https://www.facebook.com/12345678901234567",
        "post_id": "1212121212_12345678901234567",
        "post_location": "https://www.facebook.com/1212121212_12345678901234567"
      }
    }
  }
}
	

User Contributed Notes