Reply To: Display user’s social follow buttons in profile
Without knowing the error itself I can only guess. In the example code I gave I open PHP <?php and close PHP ?> , however, if you already have it open it is unnecessary and can error out if you haven’t previously closed it.
As suggested by @noizeburger, if you make the bp-custom.php page in wp-content/plugins (the actual plugins root directory not the buddypress specific directory) and put the code in there it should work and will still work if you end up changing themes later on as long as you put the images in a directory outside of the theme.
I hope this helps.