Getting author's activity feed in buddypress

So this isn’t a question but an answer to something @Tom_Eagles and I were trying to figure out in a support session.

I was trying to get the buddypress activity feed of the post’s author to show up outside the loop. I’m surprised that this is not a widget already but I digress.

After many hours of searching and testing (I’m an amateur at coding) I’ve arrived at the result:

<?php $temp_post = get_post($post_id);
$user_id = $temp_post->post_author;
$author_bp = get_the_author_meta('ID' , $user_id );

<?php if ( bp_has_activities( 'max=3&user_id=' . $author_bp ) ) : ?>
<?php while ( bp_activities() ) : bp_the_activity(); ?>
<?php locate_template( array( 'activity/entry.php' ), true, false ); ?>
<?php endwhile; ?>
<?php endif; ?>

I hope this helps someone out in the future!

Happy to be a part of WPMU as I start year two. Cheers!