Hi ,
I have a requirement to share images on Facebook & Twitter
I have Image Gallery Component where images are shown in rows and columns. There I click on Image on Modal pop up will come there I will have two buttons like : Facebook Share and Twitter.
If I click on Share it will redirect to facebook login page and after login I will be able to share an image on facebook.
and twitter I have to tweet an image from my website.
I am using AEM 6.1 version
Please help me how to share images on light box to facebook and other social media.
thank you in advance
Solved! Go to Solution.
Views
Replies
Total Likes
Hi
Working code for FB Sharing :-
Demo1:-http://jsfiddle.net/eyxtj/345/
//here the impotent part is,
var fb_title = encodeURIComponent('my title goes here!');
var fb_descr = encodeURIComponent('my description goes here');
var fb_url = encodeURIComponent('www.adobe.com');
var fb_image = encodeURIComponent('http://www.highyieldbond.com/wp-content/uploads/2013/04/silver-apple-logo-apple-picture1.jpg');
Demo2:- https://jsfiddle.net/stichoza/eyxtj/
I hope this will help you.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
I have faced similar issue once. Have you tried going to
https://developers.facebook.com/tools/debug/og/object/
and pressing the button "Fetch New Scrape information". and after that try sharing the image. If you are using any caching mechanism. please clear cache first.
regards,
Ankur Ahlawat
Views
Replies
Total Likes
Hi
Working code for FB Sharing :-
Demo1:-http://jsfiddle.net/eyxtj/345/
//here the impotent part is,
var fb_title = encodeURIComponent('my title goes here!');
var fb_descr = encodeURIComponent('my description goes here');
var fb_url = encodeURIComponent('www.adobe.com');
var fb_image = encodeURIComponent('http://www.highyieldbond.com/wp-content/uploads/2013/04/silver-apple-logo-apple-picture1.jpg');
Demo2:- https://jsfiddle.net/stichoza/eyxtj/
I hope this will help you.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
Views
Likes
Replies