Update generateSocialLinks.js

Placed $link alert after $finalString declaration, setting $finalString to an Error message.  changed encodeURI() functions to encodeURIComponent() functions.