Instagram and glide combined

I want to have a list of 5 pictures in my app, that all come from an Instagram account. So you can click on the image, and you will be sent to the Instagram account.
I want to be sent to this Instagram account, with this picture: BC Copenhagen on Instagram: "KAMP I HORSENS! Vi tager nu hul på sæsons 3 kamp, og skal endnu engang en tur til Jylland og møde Horsens IC 💪🏻👊🏻 Drengene har haft en lidt svær start på sæsonen, hvor vi har tabt de 2 første kampe. Nu hedder modstanderen altså Horsens IC! Horsens har selv kun spillet 1 kamp i denne sæson, som de vandt 64-90 over Holbæk. Sidst vi mødte Horsens var i sidste sæson, hvor drengene hiv sejren hjem! Bliver en spændende kamp som drengene er rigtig klar til! 🏀 📍Forum Horsens 🕰 15:00 📺 Basketligaen.dk Lets go Copenhagen! #connectingcopenhagen #heroesofcopenhagen #basketball #basketligaen #københavn #nørrebrohallen #valbyhallen #ballislife #bccopenhagen #basketballclubcopenhagen"

Bonus:
Is it possible to just have the 5 latest posts on Instagram be shown? Because that would be even better.

Do I need to use the web embed function to make this happen?

I did some research, and it seems like most “aggregators” out there outputs a piece of HTML + JS code for you to “embed” a customized Instagram feed.

Some require you to have an Instagram business account, I’m not sure if your account is a business account or not.

If the option above doesn’t work, maybe you can try connecting your Instagram account to a service like Make/Zapier/n8n. Everytime there’s a new post, write a line to your Google Sheets, and only display the last 5 lines, for example, in an inline list.

2 Likes

So I have tried the Zapier solution, but it didn’t seem to work that great. So I’m trying the solution you suggested now @ThinhDinh. I’m stuck at the step “Step 6: Copy the HTML code into your site”. I have copied the HTML, but where do I print it into glide?
I know it’s been a while since I started this thread, but hope you can help.

You can embed HTML using a rich text component, but if that code includes javascript, then it won’t work. Glide does not allow javascript to be embedded and ran directly on a screen. Best bet is to maybe try placing the code in a web embed component. If that doesn’t work, then you’ll have to host on another website and embed that website with the web embed component.

When I put it in a Rich Text, it makes a link with the text “Powered by Curator.io
This is the HTML:

Powered by Curator.io
<div id="curator-feed-default-feed-layout"><a href="https://curator.io" target="_blank" class="crt-logo crt-tag">Powered by Curator.io</a></div><!-- The Javascript can be moved to the end of the html page before the </body> tag --><script type="text/javascript">
/* curator-feed-default-feed-layout */
(function(){
var i,e,d=document,s="script";i=d.createElement("script");i.async=1;i.charset="UTF-8";
i.src="https://cdn.curator.io/published/66bef0b8-a238-45ab-9951-51ccb4b07df8.js";
e=d.getElementsByTagName(s)[0];e.parentNode.insertBefore(i, e);
})();
</script>
type or paste code here

That has javascript, so it won’t work with a rich text component.

However, I did figure out a trick that seems to work. A

  • Add a new text column in your table. Name it “embed” or something like that.
  • Temporarily add a file picker component and point it to that new column.
  • Take that embed code and paste it into notepad or some other basic text editor. Save the file as embed.html or something like that.
  • Use the file picker to upload that html file to the glide database.
  • Now add a web embed component and point it to that new column which now contains the html file.

You’ll end up with something like this.

image

7 Likes

I have a question. Does this update when a new post gets posted on the Instagram?

I assume it would be no different than embedding the code on any other website. If that includes automatically updating, then I’d say yes, it should, however I don’t know for sure how that code from curator.io is designed to work.

What a workaround!

2 Likes

Yeah, I was thinking about third party hosting, then it hit me that we already have a host. Just need the HTML document. I think this could come in handy for a lot of things. Now if only we could figure out a way to dynamically generate that html document. :thinking:

2 Likes

I have run into a problem with this method. It doesn’t seem to update automatically. Have I done something wrong? Or is it not possible with this method? It is very essential for this app

I don’t know. I only figured out the method as I was responding to you, so it’s new to me too. It’s probably cached until the web view is refreshed. You could maybe find some javascript to add to that html page that will cause it to auto refresh after a certain amount of time.

I found out curator updates the posts every 24 hours.
I have an interesting follow-up.
2 posts have been added to the instagram today, but for some reason, it only shows one of them in curator. All of the posts that are getting shown have different hashtags, but the one post missing does not. Do you think the posts have to have hashtags, for them to get shown in curator?

Link to the post without hashtags (doesn’t show in curator): BC Copenhagen on Instagram: "KAMP LØRDAG! Så er der kamp lørdag og turen når ned til det sydfynske, hvor modstanderen er Svendborg rabbits! 💪🏻 Copenhagen har nu vundet 3 af deres seneste kampe og jagter nu nummer 4! Der bliver lagt op til en meget tæt og underholdene lørdag eftermiddag i Svendborg Idrætscenter! 🔥 ⏰: Lørdag d. 29.10 klokken 16:00 📍: Svendborg Idrætscenter 📺: Link til kampen kommer kampdag! LETS GO COPENHAGEN"

I don’t know how curator works or how you came up with that embed code, so I can’t help you there. I’m guessing it’s some sort of setting with how you generated that embed code. I don’t know if you set it up to look at specific hashtags, or if you set it up to look at specific feeds. That may be a question for the curator team.

3 Likes

WTF?? :exploding_head:

You deserve a :trophy: Jeff!!

2 Likes