# https://social-media-posting-dev.deao.workers.dev/post POST https://graph.facebook.com/post Content-Type: application/json Reference: https://docs.deao.dev/cloudflare/https-social-media-posting-dev-deao-workers-dev-post ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: collection version: 1.0.0 paths: /post: post: operationId: https-social-media-posting-dev-deao-workers-dev-post summary: https://social-media-posting-dev.deao.workers.dev/post tags: - '' responses: '200': description: Successful response content: application/json: schema: $ref: >- #/components/schemas/https://social-media-posting-dev.deao.workers.dev/post_Response_200 requestBody: content: application/json: schema: type: object properties: x: $ref: >- #/components/schemas/PostPostRequestBodyContentApplicationJsonSchemaX media: $ref: >- #/components/schemas/PostPostRequestBodyContentApplicationJsonSchemaMedia tiktok: $ref: >- #/components/schemas/PostPostRequestBodyContentApplicationJsonSchemaTiktok youtube: $ref: >- #/components/schemas/PostPostRequestBodyContentApplicationJsonSchemaYoutube facebook: $ref: >- #/components/schemas/PostPostRequestBodyContentApplicationJsonSchemaFacebook linkedin: $ref: >- #/components/schemas/PostPostRequestBodyContentApplicationJsonSchemaLinkedin instagram: $ref: >- #/components/schemas/PostPostRequestBodyContentApplicationJsonSchemaInstagram account_id: type: string required: - x - media - tiktok - youtube - facebook - linkedin - instagram - account_id servers: - url: https://graph.facebook.com - url: https://www.youtube.com - url: https://youtube-video-summarizer-gpt-ai.p.rapidapi.com - url: https://api.cloudflare.com - url: https://dev-musiccast.odoo.com - url: https://api.search.brave.com - url: https://og-image-generator-dev.deao.workers.dev - url: https://musiccast.odoo.com - url: https://m.musicca.st - url: https://api.stripe.com - url: https://api.kie.ai - url: https://api.pexels.com - url: https://api.shotstack.io - url: https://oauth2.googleapis.com - url: https://www.googleapis.com - url: https://api.linkedin.com - url: https://www.linkedin.com - url: https://rupload.facebook.com - url: https://api.x.com - url: https://open.tiktokapis.com - url: https://open-upload-sg.tiktokapis.com - url: https://social-media-posting-dev.deao.workers.dev components: schemas: PostPostRequestBodyContentApplicationJsonSchemaX: type: object properties: text: type: string media: type: array items: type: string post_type: type: string required: - text - media - post_type title: PostPostRequestBodyContentApplicationJsonSchemaX PostPostRequestBodyContentApplicationJsonSchemaMediaI1: type: object properties: source_url: type: string format: uri required: - source_url title: PostPostRequestBodyContentApplicationJsonSchemaMediaI1 PostPostRequestBodyContentApplicationJsonSchemaMediaI2: type: object properties: source_url: type: string format: uri required: - source_url title: PostPostRequestBodyContentApplicationJsonSchemaMediaI2 PostPostRequestBodyContentApplicationJsonSchemaMediaI3: type: object properties: source_url: type: string format: uri required: - source_url title: PostPostRequestBodyContentApplicationJsonSchemaMediaI3 PostPostRequestBodyContentApplicationJsonSchemaMedia: type: object properties: i1: $ref: >- #/components/schemas/PostPostRequestBodyContentApplicationJsonSchemaMediaI1 i2: $ref: >- #/components/schemas/PostPostRequestBodyContentApplicationJsonSchemaMediaI2 i3: $ref: >- #/components/schemas/PostPostRequestBodyContentApplicationJsonSchemaMediaI3 required: - i1 - i2 - i3 title: PostPostRequestBodyContentApplicationJsonSchemaMedia PostPostRequestBodyContentApplicationJsonSchemaTiktok: type: object properties: media: type: array items: type: string title: type: string post_type: type: string description: type: string disable_duet: type: boolean privacy_level: type: string disable_stitch: type: boolean disable_comment: type: boolean required: - media - title - post_type - description - disable_duet - privacy_level - disable_stitch - disable_comment title: PostPostRequestBodyContentApplicationJsonSchemaTiktok PostPostRequestBodyContentApplicationJsonSchemaYoutube: type: object properties: media: type: array items: type: string title: type: string post_type: type: string required: - media - title - post_type title: PostPostRequestBodyContentApplicationJsonSchemaYoutube PostPostRequestBodyContentApplicationJsonSchemaFacebook: type: object properties: media: type: array items: type: string message: type: string post_type: type: string required: - media - message - post_type title: PostPostRequestBodyContentApplicationJsonSchemaFacebook PostPostRequestBodyContentApplicationJsonSchemaLinkedin: type: object properties: media: type: array items: type: string message: type: string post_type: type: string organization_id: type: string required: - media - message - post_type - organization_id title: PostPostRequestBodyContentApplicationJsonSchemaLinkedin PostPostRequestBodyContentApplicationJsonSchemaInstagram: type: object properties: media: type: array items: type: string caption: type: string post_type: type: string required: - media - caption - post_type title: PostPostRequestBodyContentApplicationJsonSchemaInstagram https://social-media-posting-dev.deao.workers.dev/post_Response_200: type: object properties: {} description: Empty response body title: https://social-media-posting-dev.deao.workers.dev/post_Response_200 ``` ## SDK Code Examples ```python import requests url = "https://graph.facebook.com/post" payload = { "x": { "text": "salo-hello world", "media": ["i3"], "post_type": "video" }, "media": { "i1": { "source_url": "https://social-media-posting-dev.assets.musiccast.deao.dev/Argil-evkhxhytos-original%20(1).mp4" }, "i2": { "source_url": "https://social-media-posting-dev.assets.musiccast.deao.dev/video.mp4" }, "i3": { "source_url": "https://social-media-posting-dev.assets.musiccast.deao.dev/4324104-uhd_3840_2160_24fps.mp4" } }, "tiktok": { "media": ["i1"], "title": "salo-hhhhmarchitosalinahelglo", "post_type": "video", "description": "salo-vvhello world", "disable_duet": False, "privacy_level": "SELF_ONLY", "disable_stitch": False, "disable_comment": False }, "youtube": { "media": ["i2"], "title": "salo-gggghello world", "post_type": "video" }, "facebook": { "media": ["i2"], "message": "salo-55555hello world", "post_type": "video" }, "linkedin": { "media": ["i1"], "message": "salo-hello world", "post_type": "video", "organization_id": "urn:li:organization:111886404" }, "instagram": { "media": ["i1"], "caption": "salo-hhhh", "post_type": "video" }, "account_id": "musiccast_main" } headers = {"Content-Type": "application/json"} response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://graph.facebook.com/post'; const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"x":{"text":"salo-hello world","media":["i3"],"post_type":"video"},"media":{"i1":{"source_url":"https://social-media-posting-dev.assets.musiccast.deao.dev/Argil-evkhxhytos-original%20(1).mp4"},"i2":{"source_url":"https://social-media-posting-dev.assets.musiccast.deao.dev/video.mp4"},"i3":{"source_url":"https://social-media-posting-dev.assets.musiccast.deao.dev/4324104-uhd_3840_2160_24fps.mp4"}},"tiktok":{"media":["i1"],"title":"salo-hhhhmarchitosalinahelglo","post_type":"video","description":"salo-vvhello world","disable_duet":false,"privacy_level":"SELF_ONLY","disable_stitch":false,"disable_comment":false},"youtube":{"media":["i2"],"title":"salo-gggghello world","post_type":"video"},"facebook":{"media":["i2"],"message":"salo-55555hello world","post_type":"video"},"linkedin":{"media":["i1"],"message":"salo-hello world","post_type":"video","organization_id":"urn:li:organization:111886404"},"instagram":{"media":["i1"],"caption":"salo-hhhh","post_type":"video"},"account_id":"musiccast_main"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://graph.facebook.com/post" payload := strings.NewReader("{\n \"x\": {\n \"text\": \"salo-hello world\",\n \"media\": [\n \"i3\"\n ],\n \"post_type\": \"video\"\n },\n \"media\": {\n \"i1\": {\n \"source_url\": \"https://social-media-posting-dev.assets.musiccast.deao.dev/Argil-evkhxhytos-original%20(1).mp4\"\n },\n \"i2\": {\n \"source_url\": \"https://social-media-posting-dev.assets.musiccast.deao.dev/video.mp4\"\n },\n \"i3\": {\n \"source_url\": \"https://social-media-posting-dev.assets.musiccast.deao.dev/4324104-uhd_3840_2160_24fps.mp4\"\n }\n },\n \"tiktok\": {\n \"media\": [\n \"i1\"\n ],\n \"title\": \"salo-hhhhmarchitosalinahelglo\",\n \"post_type\": \"video\",\n \"description\": \"salo-vvhello world\",\n \"disable_duet\": false,\n \"privacy_level\": \"SELF_ONLY\",\n \"disable_stitch\": false,\n \"disable_comment\": false\n },\n \"youtube\": {\n \"media\": [\n \"i2\"\n ],\n \"title\": \"salo-gggghello world\",\n \"post_type\": \"video\"\n },\n \"facebook\": {\n \"media\": [\n \"i2\"\n ],\n \"message\": \"salo-55555hello world\",\n \"post_type\": \"video\"\n },\n \"linkedin\": {\n \"media\": [\n \"i1\"\n ],\n \"message\": \"salo-hello world\",\n \"post_type\": \"video\",\n \"organization_id\": \"urn:li:organization:111886404\"\n },\n \"instagram\": {\n \"media\": [\n \"i1\"\n ],\n \"caption\": \"salo-hhhh\",\n \"post_type\": \"video\"\n },\n \"account_id\": \"musiccast_main\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://graph.facebook.com/post") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Content-Type"] = 'application/json' request.body = "{\n \"x\": {\n \"text\": \"salo-hello world\",\n \"media\": [\n \"i3\"\n ],\n \"post_type\": \"video\"\n },\n \"media\": {\n \"i1\": {\n \"source_url\": \"https://social-media-posting-dev.assets.musiccast.deao.dev/Argil-evkhxhytos-original%20(1).mp4\"\n },\n \"i2\": {\n \"source_url\": \"https://social-media-posting-dev.assets.musiccast.deao.dev/video.mp4\"\n },\n \"i3\": {\n \"source_url\": \"https://social-media-posting-dev.assets.musiccast.deao.dev/4324104-uhd_3840_2160_24fps.mp4\"\n }\n },\n \"tiktok\": {\n \"media\": [\n \"i1\"\n ],\n \"title\": \"salo-hhhhmarchitosalinahelglo\",\n \"post_type\": \"video\",\n \"description\": \"salo-vvhello world\",\n \"disable_duet\": false,\n \"privacy_level\": \"SELF_ONLY\",\n \"disable_stitch\": false,\n \"disable_comment\": false\n },\n \"youtube\": {\n \"media\": [\n \"i2\"\n ],\n \"title\": \"salo-gggghello world\",\n \"post_type\": \"video\"\n },\n \"facebook\": {\n \"media\": [\n \"i2\"\n ],\n \"message\": \"salo-55555hello world\",\n \"post_type\": \"video\"\n },\n \"linkedin\": {\n \"media\": [\n \"i1\"\n ],\n \"message\": \"salo-hello world\",\n \"post_type\": \"video\",\n \"organization_id\": \"urn:li:organization:111886404\"\n },\n \"instagram\": {\n \"media\": [\n \"i1\"\n ],\n \"caption\": \"salo-hhhh\",\n \"post_type\": \"video\"\n },\n \"account_id\": \"musiccast_main\"\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://graph.facebook.com/post") .header("Content-Type", "application/json") .body("{\n \"x\": {\n \"text\": \"salo-hello world\",\n \"media\": [\n \"i3\"\n ],\n \"post_type\": \"video\"\n },\n \"media\": {\n \"i1\": {\n \"source_url\": \"https://social-media-posting-dev.assets.musiccast.deao.dev/Argil-evkhxhytos-original%20(1).mp4\"\n },\n \"i2\": {\n \"source_url\": \"https://social-media-posting-dev.assets.musiccast.deao.dev/video.mp4\"\n },\n \"i3\": {\n \"source_url\": \"https://social-media-posting-dev.assets.musiccast.deao.dev/4324104-uhd_3840_2160_24fps.mp4\"\n }\n },\n \"tiktok\": {\n \"media\": [\n \"i1\"\n ],\n \"title\": \"salo-hhhhmarchitosalinahelglo\",\n \"post_type\": \"video\",\n \"description\": \"salo-vvhello world\",\n \"disable_duet\": false,\n \"privacy_level\": \"SELF_ONLY\",\n \"disable_stitch\": false,\n \"disable_comment\": false\n },\n \"youtube\": {\n \"media\": [\n \"i2\"\n ],\n \"title\": \"salo-gggghello world\",\n \"post_type\": \"video\"\n },\n \"facebook\": {\n \"media\": [\n \"i2\"\n ],\n \"message\": \"salo-55555hello world\",\n \"post_type\": \"video\"\n },\n \"linkedin\": {\n \"media\": [\n \"i1\"\n ],\n \"message\": \"salo-hello world\",\n \"post_type\": \"video\",\n \"organization_id\": \"urn:li:organization:111886404\"\n },\n \"instagram\": {\n \"media\": [\n \"i1\"\n ],\n \"caption\": \"salo-hhhh\",\n \"post_type\": \"video\"\n },\n \"account_id\": \"musiccast_main\"\n}") .asString(); ``` ```php request('POST', 'https://graph.facebook.com/post', [ 'body' => '{ "x": { "text": "salo-hello world", "media": [ "i3" ], "post_type": "video" }, "media": { "i1": { "source_url": "https://social-media-posting-dev.assets.musiccast.deao.dev/Argil-evkhxhytos-original%20(1).mp4" }, "i2": { "source_url": "https://social-media-posting-dev.assets.musiccast.deao.dev/video.mp4" }, "i3": { "source_url": "https://social-media-posting-dev.assets.musiccast.deao.dev/4324104-uhd_3840_2160_24fps.mp4" } }, "tiktok": { "media": [ "i1" ], "title": "salo-hhhhmarchitosalinahelglo", "post_type": "video", "description": "salo-vvhello world", "disable_duet": false, "privacy_level": "SELF_ONLY", "disable_stitch": false, "disable_comment": false }, "youtube": { "media": [ "i2" ], "title": "salo-gggghello world", "post_type": "video" }, "facebook": { "media": [ "i2" ], "message": "salo-55555hello world", "post_type": "video" }, "linkedin": { "media": [ "i1" ], "message": "salo-hello world", "post_type": "video", "organization_id": "urn:li:organization:111886404" }, "instagram": { "media": [ "i1" ], "caption": "salo-hhhh", "post_type": "video" }, "account_id": "musiccast_main" }', 'headers' => [ 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://graph.facebook.com/post"); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"x\": {\n \"text\": \"salo-hello world\",\n \"media\": [\n \"i3\"\n ],\n \"post_type\": \"video\"\n },\n \"media\": {\n \"i1\": {\n \"source_url\": \"https://social-media-posting-dev.assets.musiccast.deao.dev/Argil-evkhxhytos-original%20(1).mp4\"\n },\n \"i2\": {\n \"source_url\": \"https://social-media-posting-dev.assets.musiccast.deao.dev/video.mp4\"\n },\n \"i3\": {\n \"source_url\": \"https://social-media-posting-dev.assets.musiccast.deao.dev/4324104-uhd_3840_2160_24fps.mp4\"\n }\n },\n \"tiktok\": {\n \"media\": [\n \"i1\"\n ],\n \"title\": \"salo-hhhhmarchitosalinahelglo\",\n \"post_type\": \"video\",\n \"description\": \"salo-vvhello world\",\n \"disable_duet\": false,\n \"privacy_level\": \"SELF_ONLY\",\n \"disable_stitch\": false,\n \"disable_comment\": false\n },\n \"youtube\": {\n \"media\": [\n \"i2\"\n ],\n \"title\": \"salo-gggghello world\",\n \"post_type\": \"video\"\n },\n \"facebook\": {\n \"media\": [\n \"i2\"\n ],\n \"message\": \"salo-55555hello world\",\n \"post_type\": \"video\"\n },\n \"linkedin\": {\n \"media\": [\n \"i1\"\n ],\n \"message\": \"salo-hello world\",\n \"post_type\": \"video\",\n \"organization_id\": \"urn:li:organization:111886404\"\n },\n \"instagram\": {\n \"media\": [\n \"i1\"\n ],\n \"caption\": \"salo-hhhh\",\n \"post_type\": \"video\"\n },\n \"account_id\": \"musiccast_main\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Content-Type": "application/json"] let parameters = [ "x": [ "text": "salo-hello world", "media": ["i3"], "post_type": "video" ], "media": [ "i1": ["source_url": "https://social-media-posting-dev.assets.musiccast.deao.dev/Argil-evkhxhytos-original%20(1).mp4"], "i2": ["source_url": "https://social-media-posting-dev.assets.musiccast.deao.dev/video.mp4"], "i3": ["source_url": "https://social-media-posting-dev.assets.musiccast.deao.dev/4324104-uhd_3840_2160_24fps.mp4"] ], "tiktok": [ "media": ["i1"], "title": "salo-hhhhmarchitosalinahelglo", "post_type": "video", "description": "salo-vvhello world", "disable_duet": false, "privacy_level": "SELF_ONLY", "disable_stitch": false, "disable_comment": false ], "youtube": [ "media": ["i2"], "title": "salo-gggghello world", "post_type": "video" ], "facebook": [ "media": ["i2"], "message": "salo-55555hello world", "post_type": "video" ], "linkedin": [ "media": ["i1"], "message": "salo-hello world", "post_type": "video", "organization_id": "urn:li:organization:111886404" ], "instagram": [ "media": ["i1"], "caption": "salo-hhhh", "post_type": "video" ], "account_id": "musiccast_main" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://graph.facebook.com/post")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```