Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to use custom share strategy for whatsapp(Custom View). #228

Open
arkniazi opened this issue May 2, 2019 · 0 comments
Open

Not able to use custom share strategy for whatsapp(Custom View). #228

arkniazi opened this issue May 2, 2019 · 0 comments

Comments

@arkniazi
Copy link

arkniazi commented May 2, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant