2
I am developing a Web project and in this project contains the button to share on Linkedin (customized).
I’ve worked with sharing Facebook and Twitter and so far is working normal, but I’ve never used Linkedin sharing, someone has used and can help me?
Follows code:
Share from Facebook:
Html:
<a href="" ng-click="vm.facebook(baseurl + 'conteudo/' + conteudo.slug)">
<div class="img-circle compartilhar_icones">
<i class="fa fa-facebook" aria-hidden="true"></i>
</div>
</a>
JS:
vm.facebook = function (s) {
event.preventDefault();
window.open('https://www.facebook.com/sharer/sharer.php?u=' + s, '/&display=popup&ref=plugin', 'Pagina', 'STATUS=NO, TOOLBAR=NO, LOCATION=NO, DIRECTORIES=NO, RESISABLE=NO, SCROLLBARS=YES, TOP=10, LEFT=10, WIDTH=770, HEIGHT=200');
};
This code above is working, follows the code I am using for Linkedin, but is not working:
Html:
<a href="" ng-click="vm.linkedin(baseurl + 'conteudo/' + conteudo.slug, conteudo.nome)">
<div class="img-circle compartilhar_icones terceiro">
<i class="fa fa-linkedin icone_linkedin" aria-hidden="true"></i>
</div>
</a>
JS:
vm.linkedin = function (s, a){
event.preventDefault();
window.open('http://www.linkedin.com/shareArticle?mini=true&url=' + s +';title=' + a +'', '', '550', '510', 'yes');
};
It has already positive and marked as the right answer, but, it would not be better in API this sharing??
– William Aparecido Brandino
I presented what I knew, but anyway if it is just to share it is not necessary, note that this only happens because Linkedin/facebook so want/authorize: https://developers.facebook.com/docs/plugins/share-button/. @Williamasimiliar Andean see here an example taken from here: https://jsfiddle.net/7yngdovr/1/ . As you see for this (share) it doesn’t have to go beyond this
– Miguel