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
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.
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:
Go to your account and then click on MY FEEDS and click on the three buttons and a dropdown will appear
Click on the Get ATOM link and it will display a URL with your 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:
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.
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>';
$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>' );
$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.
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.
I am an entrepreneur based in Sydney Australia. I was born in Vietnam, grew up in Italy and currently residing in Australia. I started my first business venture Advertise Me from a random idea and have never looked back since. My passion is in the digital space, affiliate marketing, fitness and I launched several digital products. You will find these on the portfolio page.
I’ve decided to change from a Vegetarian to a Vegan diet and started a website called Veggie Meals.
I started this blog so I could leave a digital footprint of my random thoughts, ideas and life in general.
Affiliate Compensated: there are some articles with links to products or services that I may receive a commission.