Using url2png how to show webpage screenshot thumbnail in bookmarks?

Using from url2png.com

<?php
  $apikey="YOUR_API_KEY";
  $secret="YOUR_SECRET_KEY";
  $token=md5("url=target.com" . $secret);
  $img="api.url2png.com/v6/$apikey/$token/png/?url=target.com";
  ?>
<img src='http://<?php echo $img; ?>' />

I will like to show thumbnails for the shared bookmarked webpages in the activity stream, activity widget in profile page as well as in Bookmarks. Can someone help with actual code or a small plugin please?