embed icon indicating copy to clipboard operation
embed copied to clipboard

Embed doesn't recognise Instagram reels

Open Eliam93 opened this issue 3 years ago • 3 comments

Hi, I'm trying to embed a reel URL, but it doesn't work as for Ig posts. There is any chance to embed that? Thanks

Eliam93 avatar May 25 '22 07:05 Eliam93

It seems that embedding not work when URL has query parameter.

https://www.instagram.com/p/CfQzzGNphD8/?utm_source=ig_web_copy_link -> not work https://www.instagram.com/p/CfQzzGNphD8/ -> work

kentarohorie avatar Jun 26 '22 11:06 kentarohorie

I made a mistake. My problem not relate with this issue.

kentarohorie avatar Jun 26 '22 11:06 kentarohorie

instagramPost: {
    regex: /https?:\/\/www\.instagram\.com\/p\/([^\/\?\&]+)\/?([\s\S]*)\/?/,
    embedUrl: "https://www.instagram.com/p/<%= remote_id %>/embed",
    html: '<iframe width="400" height="505" style="margin: 0 auto;" frameborder="0" scrolling="no" allowtransparency="true"></iframe>',
    height: 505,
    width: 400,
    id: (groups) => {
        return groups[0];
    }
}
instagramReel: {
    regex: /https?:\/\/www\.instagram\.com\/reel\/([^\/\?\&]+)\/?([\s\S]*)\/?/,
    embedUrl: "https://www.instagram.com/reel/<%= remote_id %>/embed",
    html: '<iframe width="400" height="600" style="margin: 0 auto;" frameborder="0" scrolling="no" allowtransparency="true"></iframe>',
    height: 600,
    width: 400,
    id: (groups) => {
        return groups[0];
    }
}

These two configs worked for me. You'll have to add these to the config object when you instantiate the EditorJS object.

Swanand01 avatar Dec 14 '22 19:12 Swanand01