Categories
Social Media WordPress

WordPress + ACF + Instagram Feed without API

[Update: See bottom for screenshots]

With the the privacy climate these days — see Facebook’s woes with Cambridge Analytica — Instagram has finally enforced the API changes and limits they announced in January. After riding dirty with the feeds for the past few months (despite the summertime deadline), two sites’ feeds stopped working last week. Crap.

I needed a quick fix; something easy to implement, and preferably without having to use the API. Signing up again or changing keys, client IDs, client secrets, etc. was annoying.

These were my fairly simple requirements and stipulations:

  • Public account to display on the site
  • No need to install a 3rd party JavaScript or PHP library
  • Feature up to three posts on the site, ideally able to select which posts and not limited to the latest three posts
  • Not a plugin (WordPress)

From the official Instagram site i learned that WordPress had added support to its oEmbed implementation. oEmbed is an open format used to display content from a given site by simply pasting a url. I remember when WordPress support was limited to YouTube and Vimeo, but has expanded to dozens of sites. Sweet and simple.

Being that i was already using ACF Pro (Advance Custom Fields Pro), i setup a repeater field to use oEmbed as the type. Now, i only have to paste a post’s url for each repeater field. It automatically grabs the post’s official embed code, and even has a preview of the post once the url is pasted.

There’s no customization, however; so no changing the look to resemble a site’s theme, or removing the caption or Like count. Whatever. Not important for me for these sites. I just need to display IG posts to increase engagement! And to not have outdated posts on the feed.

It’s a better solution, with less margin of error than manually grabbing the official embed code for each post. A copy and paste of a url with post preview is user (the client) and developer (me) friendly. Plus, there’s no risk running into API limits or a block to accessing public accounts!

Hope this tip helps you out, too!

Update: A reader had some trouble getting IG feed to work recently out of no where and requested the settings i used. I created a separate page dedicated to my settings and a working feed. Here it is: ACF Testing Page.

(Visited 37 times, 1 visits today)
0 0 votes
Article Rating
Subscribe
Notify of
guest
2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Dion
Dion
2 years ago

Hi, is there any chance that you can share the code/settings that you used? A client has his website built using ACF to display IG feed but it doesn’t work anymore in the last few days and I couldn’t make it work.

Best regards