mardi 30 juin 2015

addThis is not working for 2 products

I'm trying to use addThis plugin for facebook likes, tweet and g+ against my products on webpage. Now I have a page where we show 2 products and I want to give fb like button for each. What I am showing but it doesn't work.

How will I tell addThis plugin, 2 different products. It is taking same product for both of tweets.

if($(".share-list").length > 0 ){
                                        var addthis_share = {
                                            url_transforms : {
                                                 shorten: {
                                                      twitter: 'bitly'
                                                    }
                                                 }, 
                                                shorteners : {
                                                    bitly : {} 
                                                 }
                                        };          
                                        var addthis_config = {"data_track_addressbar":false, ui_use_css : false};   
                                        var addthisScript = document.createElement('script');
                                        console.log('src');
                                        addthisScript.setAttribute('src', 'http://ift.tt/1KmMBcP')
                                        document.body.appendChild(addthisScript)
                                    }

It's not even working, when I click on facebook button nothing happens.




Aucun commentaire:

Enregistrer un commentaire