If you’re looking for a way to display your Instagram posts on your BuddyPress group page then I have a solution for you.

You will obviously need to have a WordPress site with the BuddyPress plugin installed and I’ll assume BuddyPress is already configured and working. I’ll use our Veggie Meals website as an example in this post since I actually got it all working on this page: Vegan Vegetarian Social Feed

Veggie Meals Vegan Vegetarian BuddyPress Group Instagram Social Media Posts Example

If you’re just looking at displaying a live social wall using the Instagram posts, then I would recommend you use our Social Wall app instead of following these instructions. In my particular case, I wanted to grab the posts and store some of the post content on our actual website. We also have the Social Wall displayed at the bottom of the website so check that out.

Veggie Meals Vegan Vegetarian Social Wall

After some digging around, there wasn’t a clean way or a WordPress plugin that simply grabbed and stored the text content of the posts in a BuddyPress group. The first you need to do is to generate a feed of your Instagram account. There are a few services that can do it but some are paid monthly subscriptions. The one I ended up using is called http://fetchrss.com/ and it has a free plan which includes the following limitations:

  • 5 feeds in account
  • 24 hours feeds update rate
  • 5 articles in a feed
  • “Generated with” text in feeds
  • Deleting unused feeds in 7 days of inactivity

If you’re after more articles in the feed and don’t want the branding at the bottom of each feed item then you will need to upgrade your plan.

Generate your RSS Instagram feed by going to the RSS Generator and type in your Instagram URL like below:

Veggie Meals Vegan Vegetarian Fetch RSS instagram

Go to your account and then click on MY FEEDS and click on the three buttons and a dropdown will appear

Veggie Meals Vegan Vegetarian Fetch RSS instagram my feeds

Click on the Get ATOM link and it will display a URL with your ATOM feed.

Veggie Meals Vegan Vegetarian Fetch RSS instagram my feeds atom feed

Change the URL of the ATOM feed to an XML file by replacing .atom with .xml and you will then see the RSS feed. So it will now look something like this:

Veggie Meals Vegan Vegetarian Fetch RSS instagram my feeds xml feed

The next step involved installing a WordPress plugin called BP External Group Blogs. Do a search in the WordPress plugin ADD NEW plugin page and look for BP External Group Blogs.

Veggie Meals Vegan Vegetarian BuddyPress BP External Group Blogs

Install then activate. Once it’s activated check the Group pages and you should now see a tab called External Blogs. You can enter the RSS feed that was generated from Fetch RSS in the Feed URL’s text box and then the system will start importing the Instagram posts. Now there are a few issues I discovered with the plugin and these are:

  • It didn’t display the images from the RSS feed
  • The description only display an extract of the content of the post (135 characters)
  • The feed will keep importing the same posts causing duplicate entries. It doesn’t do any checking to see whether a previous post is already imported and published

To solve the issue with displaying the images and the limited description, I needed to modify the plugin code. Here’s the list of changes I made to the external-groups/includes/bp-groups-externalblogs.php file:

Line 228 changed the below code:

$activity_content = '<div>' . strip_tags( bp_create_excerpt( $post['description'], 175 ) ) . '</div>';

To this:

$activity_content = '<div>' . $post['description'] . '</div>';

This fixed the issue with displaying the images in the description. It also meant that it would display the entire contents of the description field.

Line 226 changed the below code:

$activity_action = sprintf( __( 'Blog: %s from %s in the group %s', 'bp-groups-externalblogs' ), '<a class="feed-link" href="' . esc_attr( $post['link'] ) . '">' . esc_attr( $post['title'] ) . '</a>', '<a class="feed-author" href="' . esc_attr( $post['blogurl'] ) . '">' . attribute_escape( $post['blogname'] ) . '</a>', '<a href="' . bp_get_group_permalink( $group ) . '">' . attribute_escape( $group->name ) . '</a>' );

To this:

$activity_action = sprintf( __( 'Social posts from : %s from %s in the group %s', 'bp-groups-externalblogs' ), '', '<a class="feed-author" href="' . esc_attr( $post['blogurl'] ) . '">' . attribute_escape( $post['blogname'] ) . '</a>', '<a href="' . bp_get_group_permalink( $group ) . '">' . attribute_escape( $group->name ) . '</a>' );

This removed the title/description displayed the feed activity.

Veggie Meals Vegan Vegetarian BuddyPress Group Instagram Social Media Posts Title

With the last issue with importing duplicate entries, I haven’t worked out a solution for that yet so if you know a way to get around this please let me know.

Subscribe to my newsletter where I will share my journey in affiliate marketing, business, technology, fitness and life in general. Hopefully, this motivates you to also change your journey in life.

This field is required.

Subscribe to my newsletter where I will share my journey in affiliate marketing, business, technology, fitness and life in general. Hopefully, this motivates you to also change your journey in life.

This field is required.

If this article helped you in any way and you want to show your appreciation, I am more than happy to receive donations through PayPal. This will help me maintain and improve this website so I can help more people out there. Thank you for your help.

HELP OTHERS AND SHARE THIS ARTICLE


2Shares

LEAVE A COMMENT