Sunday, April 14, 2019

How to get the full resolution image from an FB post using Zapier?

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

Rachel is a smart business-woman who leverages social media to get more business leads. She has hired a digital marketing agency to manage her business’s Facebook page. She has a simple requirement: when the company creates a new post on her FB page, she wants to retrieve the image in that post and send it to other marketing channels. Doing this manually is a waste of her precious time, which could be spent growing her business. Naturally, smart Rachel started looking for ways in which she could automate this, and, like many others, zeroed in on Zapier.

Fortunately, Zapier allows has a trigger that activates a Zap when a new post is created on an FB page. Unfortunately, FB only sends the link to the post’s image in 130px X 130 px resolution :



This seemed like the end of the road until I thought about Zapier’s webhooks and FB’s Graph API. You could get the link to full resolution image by querying the Graph api like this :

https://graph.facebook.com/pageID_postID?fields=full_picture&accessToken=yourAccessToken

Part 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.

Get a page access token
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.

Part 2: On to Zapier

Now, in Zapier, choose FB Pages for the trigger :
From the trigger options, select “New Post to your timeline”, and click Continue. Next, connect or select the FB account you want to use, and click Continue. Finally, select the FB Page you want to use and click continue. After this, Zapier will try to pull sample posts from your page’s timeline. Once that is done, test the step. That ends the trigger step.
For the Action Step, select Webhooks :
In the URL input, enter
https://graph.facebook.com/
, and then, click on “insert field” button :

Next, select “ID” from insert field screen :

Now the URL input field looks like this :

Next, we have to enter the access token and the fields argument. Please be careful. These should be exactly as shown here. One key is access_token and the other is fields. These are parameters that will be sent along with the request, please make sure they are spelled correctly. For the access_token value, paste the access token you obtained from earlier steps on FB. For the “fields” key, enter the value full-picture. Leave all other options to default, and click “Continue”. Now you can test this step.

That’s all! . Now you have access to the full image link in subsequent steps. Here, I’m using it with Gmail, but it is applicable to anything you use.


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