Skip to content

Pinterest is Broken #287

@LockeAG

Description

@LockeAG

Hi guys again ...

Seems that : encodeURIComponent(this.settings.media) and encodeURIComponent(this.settings.description) , are not getting the correct data .

In my basic knowledge I needed to add data-media so I can do the next implementation:

$(shareElement).each(function(i) {
        var lnk = $(this).attr('data-url'),
        txt = $(this).attr('data-text'),
        media = $(this).attr('data-media'),
        resTxt = encodeURIComponent(txt),
        resLnk = encodeURIComponent(lnk),
        resMedia = encodeURIComponent(media);

        $(this).sharrre({
            share: {
                facebook: true,
                twitter: true,
                pinterest: true,
            },
            template: '<ul class="box"><!--<li> <h2>{total}<small>Compartido</small> </h2> </li>--><li id="facebook"><i class="fa fa-facebook"></i></li><li id="twitter"><i class="fa fa-twitter"></i></li><li id="pinterest"><i class="fa fa-pinterest"></i></li></ul>',
            enableHover: false,
            enableTracking: false,
            buttons: {
                facebook: {
                    layout: 'button',
                    send: true
                },
                twitter: {
                    via: 'robbreportmx',
                },
                pinterest: {
                    url:''+ lnk + '',
                    media: ''+ media + '',
                    description: ''+ txt + ''
                }
            },
            render: function(api, options) {
                $(api.element).on('click', '#twitter', function() {
                    api.openPopup('twitter');
                    return false;

                });

                $(api.element).on('click', '#facebook', function() {
                    api.openPopup('facebook');
                    return false;

                });

                $(api.element).on('click', '#pinterest', function() {
                    api.openPopup('pinterest');
                    return false;

                });

            }
        });

    });

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions