I used Social Feed to embed a client's Instagram page on their website.

We just noticed that Instagram posts with multiple images, or post slideshows, are not being shown.
After some inspection, I saw these posts are not being passed to the template.

Can you extend the module to support the Instagram Multiple images?
These posts would need their own template, so custom code can be added in the theme layer for slider functionality.

Example of instagram post with multiple images:
https://www.instagram.com/p/BgwAGzSgCji/?utm_source=ig_embed (I just google to get a result, not intended to be advertising)

Comments

-otto- created an issue. See original summary.

hemangi.gokhale’s picture

Status: Active » Postponed (maintainer needs more info)
idiaz.roncero’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new925 bytes

Hello;

I found the same issue and tracked it down to the following code:

    foreach ($posts as $post) {
      $items[] = [
        '#theme' => 'socialfeed_instagram_post_' . $post['raw']->type,
        '#post' => $post,
        (...)
      ];
    }

The type of post is set to "carousel" but there is no "socialfeed_instagram_post_carousel" template declared, only "image" and "video". The solution is to add the template. I attached a patch that solves the problem.

I tried this on my install and it works. For the template, a copy of socialfeed_instagram_post_image works as a charm. Still, I think is good to have a separate template: this way, people can style carousel thumbnails different from image thumbnails if they need to (i.e, add an icon indicating that there are more images that can be seen on Instagram, etc...)

idiaz.roncero’s picture

Sorry, i forgot to update the template preprocess function in order to make links work on carousel thumbnails.

This patch is the good one, forget the patch on #3.

  • 96f425e committed on 8.x-1.x
    Issue #2976047 by idiaz.roncero, -otto-: Support for instagram post with...
hemangi.gokhale’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.