Open arkniazi opened 5 years ago
I want to create custom view for whatsapp share with CUSTOM SHARE STRATEGY. I have created for facebook and twitter which are working fine but its not working with whatsapp. below is the code for facebook custom view which is working. jsSocials.shareStrategies["fb-popup"] = function(args) { return $('<div class="row d-flex align-items-center">\n' + ' <div class="col-2">\n' + ' <i class="fab fa-facebook-square"></i>\n' + ' </div>\n' + ' <div class="col-5 pl-0">\n' + ' {{__("opportunities.share_on_facebook")}}\n' + ' </div>\n' + ' <div class="col-5 text-end">\n' + ' <a class="btn btn-outline-primary">{{__("opportunities.share")}}</a>\n' + ' </div>\n' + ' </div>').click(function() { window.open(args.shareUrl, "MyShareWindow", "width=800, height=600, location=1, resizeable=1, menubar=0, scrollbars=0, status=0, titlebar=0, toolbar=0"); }); }; $(".jss-share-facebook").jsSocials({ shareIn: "fb-popup", showLabel: false, showCount:false, shares: [ { share:"facebook", logo:"", }] });
jsSocials.shareStrategies["fb-popup"] = function(args) { return $('<div class="row d-flex align-items-center">\n' + ' <div class="col-2">\n' + ' <i class="fab fa-facebook-square"></i>\n' + ' </div>\n' + ' <div class="col-5 pl-0">\n' + ' {{__("opportunities.share_on_facebook")}}\n' + ' </div>\n' + ' <div class="col-5 text-end">\n' + ' <a class="btn btn-outline-primary">{{__("opportunities.share")}}</a>\n' + ' </div>\n' + ' </div>').click(function() { window.open(args.shareUrl, "MyShareWindow", "width=800, height=600, location=1, resizeable=1, menubar=0, scrollbars=0, status=0, titlebar=0, toolbar=0"); }); }; $(".jss-share-facebook").jsSocials({ shareIn: "fb-popup", showLabel: false, showCount:false, shares: [ { share:"facebook", logo:"", }] });
and for whatsapp
jsSocials.shareStrategies["wapp-popup"] = function(args) { return $('<div class="row d-flex align-items-center">\n' + ' <div class="col-2">\n' + ' <i class="fab fa-whatsapp-square"></i>\n' + ' </div>\n' + ' <div class="col-5 pl-0">\n' + ' {{__("opportunities.share_on_facebook")}}\n' + ' </div>\n' + ' <div class="col-5 text-end">\n' + ' <a class="btn btn-outline-primary">{{__("opportunities.share")}}</a>\n' + ' </div>\n' + ' </div>').click(function() { window.open(args.shareUrl, "MyShareWindow", "width=800, height=600, location=1, resizeable=1, menubar=0, scrollbars=0, status=0, titlebar=0, toolbar=0"); }); }; $(".jss-share-whatsapp").jsSocials({ // shareIn: "wapp-popup", showLabel: false, showCount:false, shares: [ { share:"whatsapp", logo:"", }] });
I don't know if this support whatsapp with custom views. Can somebody help me with this.
I want to create custom view for whatsapp share with CUSTOM SHARE STRATEGY. I have created for facebook and twitter which are working fine but its not working with whatsapp. below is the code for facebook custom view which is working.
jsSocials.shareStrategies["fb-popup"] = function(args) { return $('<div class="row d-flex align-items-center">\n' + ' <div class="col-2">\n' + ' <i class="fab fa-facebook-square"></i>\n' + ' </div>\n' + ' <div class="col-5 pl-0">\n' + ' {{__("opportunities.share_on_facebook")}}\n' + ' </div>\n' + ' <div class="col-5 text-end">\n' + ' <a class="btn btn-outline-primary">{{__("opportunities.share")}}</a>\n' + ' </div>\n' + ' </div>').click(function() { window.open(args.shareUrl, "MyShareWindow", "width=800, height=600, location=1, resizeable=1, menubar=0, scrollbars=0, status=0, titlebar=0, toolbar=0"); }); }; $(".jss-share-facebook").jsSocials({ shareIn: "fb-popup", showLabel: false, showCount:false, shares: [ { share:"facebook", logo:"", }] });
and for whatsapp
jsSocials.shareStrategies["wapp-popup"] = function(args) { return $('<div class="row d-flex align-items-center">\n' + ' <div class="col-2">\n' + ' <i class="fab fa-whatsapp-square"></i>\n' + ' </div>\n' + ' <div class="col-5 pl-0">\n' + ' {{__("opportunities.share_on_facebook")}}\n' + ' </div>\n' + ' <div class="col-5 text-end">\n' + ' <a class="btn btn-outline-primary">{{__("opportunities.share")}}</a>\n' + ' </div>\n' + ' </div>').click(function() { window.open(args.shareUrl, "MyShareWindow", "width=800, height=600, location=1, resizeable=1, menubar=0, scrollbars=0, status=0, titlebar=0, toolbar=0"); }); }; $(".jss-share-whatsapp").jsSocials({ // shareIn: "wapp-popup", showLabel: false, showCount:false, shares: [ { share:"whatsapp", logo:"", }] });
I don't know if this support whatsapp with custom views. Can somebody help me with this.