Open ivarreukers opened 7 years ago
I am having the same issue - any suggestions or insight you can offer?
Same here.
I don't think the creator is updating the current repo, whatsapp, email, telegram and tumblr are all very easy to achieve but yet still on the roadmap. Shame, it would make a great library.
Workaround is to create LinkedIn share popup for yourself. In Angular 2, use
shareOnLinkedIn() {
// returns the url curently in the browser
let currentUrl = window.location.href;
// makes the url and titles URI safe
let encodedUrl = encodeURIComponent(currentUrl);
let encodedTitle = encodeURIComponent("MyTitle");
let encodedSource = encodeURIComponent("SomeDomainSource");
this.linkedInShareUrl = `https://www.linkedin.com/shareArticle?mini=true&url=${encodedUrl}&title=${encodedTitle}&source=${encodedSource}`;
// In some versions the popup won't open unless it's being used to initialize a variable.
let popup = window.open(this.linkedInShareUrl, "myWindow", 'width=800,height=600');
}
And just create a (click)
event on the button instead of [linkedIn]
to call this function.
<button class="ceiboShare" ceiboShare [innerHtml]="inInner" (click)="shareOnLinkedIn()"></button>
(my inInner
refers to public inInner = "<img src='../images/socials/custom-linkedin.svg'>";
so I have a custom image)
Source: share-on-linkedin (under 'Customized URL')
Hi, cool module. Just having 1 small problem, twitter, google+ and facebook are working perfectly. But just LinkedIn doesn't seem to work.
Code (copied from README.md):
Error message from Chrome: