Giter Site home page Giter Site logo

Comments (6)

Hanzofm avatar Hanzofm commented on June 8, 2024 2

Thanks, I'll read it.

For the moment, this is my working solution:

<img  [shareButton]="'facebook'"
                                  [sbUrl]="'http://www.valenciacf.com'"
                                  [sbImage]="'http://1.bp.blogspot.com/-UTG_QBXdFvc/UGOBID_zYnI/AAAAAAAAAB8/2bviUM96llw/s1600/gatete.jpg'"
                                  [sbTitle]="'Titulo facebook de prueba'"
                                  [sbDescription]="'Descripcion facebook de prueba'"
                                    mdTooltip="Publicar en Facebook"
                                  src="../../../app/Assets/img/facebook-box.png">
                            <img  [shareButton]="'twitter'"
                                  [sbUrl]="'http://www.valenciacf.com'"
                                  [sbDescription]="'Descripcion facebook de prueba'"
                                  [sbTags]="'hola, adios'"
                                    mdTooltip="Publicar en Twitter"
                                  src="../../../app/Assets/img/twitter.png">
                            <img  [shareButton]="'whatsapp'"
                                  [sbUrl]="'http://www.valenciacf.com'"
                                    mdTooltip="Publicar en  WhatsApp"
                                  src="../../../app/Assets/img/whatsapp.png">
                            <img  [shareButton]="'pinterest'"
                                  [sbUrl]="'http://www.valenciacf.com'"
                                  [sbImage]="'http://1.bp.blogspot.com/-UTG_QBXdFvc/UGOBID_zYnI/AAAAAAAAAB8/2bviUM96llw/s1600/gatete.jpg'"
                                  [sbDescription]="'Descripcion pinterest de prueba'"
                                  [sbTitle]="'Titulo Pinterest de prueba'"
                                  mdTooltip="Publicar en  Pinterest"
                                  src="../../../app/Assets/img/pinterest-box.png">
                            <img  [shareButton]="'linkedin'"
                                  [sbUrl]="'http://www.valenciacf.com'"
                                  [sbDescription]="'Descripcion linkedin de prueba'"
                                  [sbTitle]="'Titulo Linkedin de prueba'"
                                  mdTooltip="Publicar en  Linkedin"
                                  src="../../../app/Assets/img/linkedin-box.png">
                            <img  [shareButton]="'googleplus'"
                                  [sbUrl]="'http://www.valenciacf.com'"
                                  mdTooltip="Publicar en Google +"
                                  src="../../../app/Assets/img/google-plus-box.png">
                            <img  [shareButton]="'tumblr'"
                                  [sbUrl]="'http://www.valenciacf.com'"
                                  mdTooltip="Publicar en  Tumblr"
                                  src="../../../app/Assets/img/tumblr.png">

It would be good to list the available options of each provider on the description of the library.

What have you thought about the future features of the library?

Thanks for all

from ngx-sharebuttons.

Hanzofm avatar Hanzofm commented on June 8, 2024 1

Thanks, I've just updated to ngx version. Thanks for new features.

from ngx-sharebuttons.

MurhafSousli avatar MurhafSousli commented on June 8, 2024

@Hanzofm thanks for the feedback,
It depends on what the service offers, most these services doesn't accept more than the url parameter, so you should set these values using the meta tags to get it work (which is done on the server side).

However some services accepts image parameter through their share link, like fb and pinterest. (and that's why [image] input exists)

G+ only accept the URL.
Twitter and LinkedIn don't accept image parameter.

for example our demo has these meta tags in the head

<meta property="og:title" content="Angular Share Buttons">
<meta property="og:description" content="Simple, lightweight, customizable share buttons">
<meta property="og:url" content="https://murhafsousli.github.io/ng2-sharebuttons">
<meta property="og:image" content="https://murhafsousli.github.io/ng2-sharebuttons/assets/img/cover.png">

from ngx-sharebuttons.

Hanzofm avatar Hanzofm commented on June 8, 2024

Sorry, could you explain me a little more how to use the meta tags? I have to set meta tags individually for each service on head (index.html)? How set then dinamically the url to share?

What is "og:.."? Could you provide me another example?

Thanks for your work

from ngx-sharebuttons.

MurhafSousli avatar MurhafSousli commented on June 8, 2024

@Hanzofm Yes, you need to set each one individually. your angular app is considered as a client app (which is a static html that runs javascript), so you have only one chance to set the meta tags, more info read this.
For dynamic meta tags you should have a server rendering side (like universal), because these social services can't read your angular app, they just read the static html coming from your server.
To shorten things for you, you won't be able to set meta tags dynamically unless you are using universal (or a server rendering shell).

from ngx-sharebuttons.

MurhafSousli avatar MurhafSousli commented on June 8, 2024

@Hanzofm Hi again, I was reading the old issues and I just noticed your last comment now

I've updated the docs in the wiki, I hope this helps

URL Title Description Image Tags
facebook
twitter
google+
linkedin
pinterest
tumblr
whatsapp
reddit
stumbleupon

from ngx-sharebuttons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.