In Buddypress activity steam, Buddypress provides you a Favorite button which is similar to Facebook ‘Like’. When any user click on Favorite button, an activity filter tab opened named ‘favorites’ which contain all favorite activities of that user.

Now Whats about Activity’s perspective? I mean, how can I show user names just below these activity meta button (Comment, Favorite etc)? there no default way, but lets write a function or may be plugin for it. First we need to get users who Favorited a particular activity.

When user’s favorite activities information are saved as an array in wp_usermeta table, which meta key is ‘bp_favorite_activities’
So we can get user ID from this table if I know activity ID, we can get activity ID simply calling bp_get_activity_id() inside the loop, and as bp_favorite_activities saved as an array in database, we can user LIKE command with activity id to know if that particular activity id exist on that array or not..yes, we could also do that with php array matching function, but it is faster I think.