Is it possible to add an image to a html page that only shows up when sharing page on Facebook/G+? The image should not be visible in the html page since it contains a Flash game, but I would like it to show up when you post a link to the url on social sites.
yes you can. Just add
<meta property="og:image" content="http://www.domain.com/shareimage.jpg"/>
at the top of the html page that you want to share. The image path that you use here will come up in the facebook.
Refer Open Graph