How to keep empty fields from appearing in php?

If you want to hide, for example, the_author_meta('linkedin'); if no data exists for that field, then you could just do the following

<?php if(!empty(get_the_author_meta('linkedin'))) { ?> 
        <a href="https://wordpress.stackexchange.com/questions/187400/<?php the_author_meta("linkedin'); ?>" target="_blank"><i class="fa fa-linkedin-square" title="LinkedIn"></i></a> 
<?php } ?>`

and then apply similar logic to other fields. If this is not what you were asking, then you should explain a little more about what you are trying to accomplish.