Does anyone know how to get the facebook SDK JS share dialog to work with each image in a lightbox gallery?
Since there are many images on each portfolio page, I can't use the OpenGraph meta tags. So, I've tried both the URL Redirection method and the JS SDK's FB.ui function and neither seems to want to pick up my custom parameters. It will successfully pull the title of the page and for each gallery it pulls the first image on the page, but won't pull the description. This is better than nothing, but it would be really great if there is a way to use the custom parameters I'm passing to it.
Here's how I'm constructing the URL for facebook:
var title = item.el.attr('title'),
imgURL = item.el.attr('href'),
pageURL = window.location.href,
fbURL = 'https://www.facebook.com/dialog/share?app_id=1773322452958479&';
fbURL += 'href=' + encodeURIComponent(pageURL);
fbURL += '&picture=' + encodeURIComponent(imgURL);
fbURL += '&description=DescriptionGoesHere';
Site in production: http://stoneblossom.twopaperdolls.com/portfolio/
Codepen example: https://codepen.io/TPDBrendan/pen/vZKLQJ
No good answer here, basically have to just accept that Facebook can only share via meta tags, which means one image per page...