Friday, April 19, 2019

How to post an FB video to youtube using Zapier?

Have a specific query? shoot a mail to contact.zapfans@gmail.com, and I’ll get back :)

Like most entrepreneurs now, Tina uses Facebook to create awareness about her business and generate leads. In order to keep her audience engaged, she frequently uses live videos. However, like any smart person (I mean you!), Tina too wants to do more. Once her live video is completed, she'd like to upload it to youtube automatically. So she sought assistance and I obliged (just like I'll oblige your request).
Here's how we upload Facebook videos to youtube automatically :

Step 1: Create an FB app
Running this query requires creating an FB app and getting an access token. But, please remember, you don’t have to turn your app on, or submit it to review for this purpose. It will work just fine in development mode. Please refer my post on How to create an FB app.

Step 2: Get Page access token from FB Graph APi
We need an access token to make authorized requests to the FB Graph API. If you're not familiar with this, please refer my post: How to obtain an FB page access token.

Step 3: Create a new post trigger in Zapier 
Step 4: Get video ID using the Formatter step
We need to grab the video id from the FB post, but Fb returns an ID field whose value is
yourPageID_yourVideoID

So, we have to split the ID field by "_" and get the video id, which is the second part of the value. 

Please ensure you specify "Second" as segment index under the separator :
Click Continue and Test this step.

Step 5: Select Webhooks as the next Action Step
Select "Get" as the option and click "Continue"

Step 6: Enter the URL for Graph API
For URL, enter https://graph.facebook.com/  and click on "Insert a Field" button, then select ID from the Formatter Step.
The URL field should look like this right now:

Step 6: Enter query parameters
To obtain the URL of the video, we query the Graph API  with two additional parameters :
access_token (obtained in Step 2) and the fields parameter whose value is "source"
Click "Continue" and test this action step.

Step 7: Add Youtube action step 
  Step 7-1: Select Youtube for the next action step.
  Step 7-2: Select "Upload Video" action.
  Step 7-3: Connect your youtube account, or select an already connected account.
  Step 7-4: Either enter new values or select values from the previous steps for "Title" and                                     "Description" fields.

Step 8: Select the video URL from the previous action step
For the "Video" field, we provide the URL to the desired video. To do so, select the "Source" from the previous webhook :

Please remember to select specify "Privacy Status" as "Private" or "Public"
Click "continue" and "send test to Youtube".

That's all! now pat yourself on the back for doing so great!
Once satisfied, name your Zap and turn it on.
Hope this was fun and helpful :)



Have a specific query? shoot a mail to contact.zapfans@gmail.com, and I’ll get back :)






Share:

0 comments:

Post a Comment

How to retrieve larger resolution images from FB post?

Have a specific query? shoot a mail to contact.zapfans@gmail.com, and I’ll get back :) Some days ago, I wrote a post titled  How to get the...

Search This Blog

Blog Archive