Coder Social home page Coder Social logo

Comments (24)

dejanstojanovic avatar dejanstojanovic commented on May 28, 2024

Hi,
The answer you got is correct, this method needs to be called every time new image is loaded. Since I am using a custom code for a light box, adding AddThis elements and its initialization needs to be done in this custom code I wrote in order to support AddThis.

Find function addLikeButton (line 464). This is basically the place where you need to dynamically add your AddThis html and initialize AddThis code.
Let me know if this helped.

from facebook-album-browser.

dchicon avatar dchicon commented on May 28, 2024

Hi Dejan, Thanks for the answer.
The problem is that I´m not a developer,( not pro, only amateur. I´m graphic designer) so it´s really difficult for me to change the code because first I´ve to research in google, and as i told you, not much help with addthis.init() and addthis.layers.refresh().
Some extra help, please?
Thank you very much

from facebook-album-browser.

dejanstojanovic avatar dejanstojanovic commented on May 28, 2024

No problem man,
I'll try to add this thing as an option for the plugin. I already started doing some code, so hopefully soon it will be there.
Will let you know

from facebook-album-browser.

dchicon avatar dchicon commented on May 28, 2024

Great!
you're invited to some beers in Spain when you wanna!

from facebook-album-browser.

dejanstojanovic avatar dejanstojanovic commented on May 28, 2024

Give it a try now.
Set shareButton to true and addThis to your AddTHis public id from your account.
You can check sample test page in this solution as it has these settings which I used to do testing.
Let me know if you spot any issue

from facebook-album-browser.

dchicon avatar dchicon commented on May 28, 2024

It doesn´t work. Addthis don´t appears

from facebook-album-browser.

dejanstojanovic avatar dejanstojanovic commented on May 28, 2024

That is weird. Make sure you took the latest code from the GitHub.
Make sure you are running page from some local web server, IIS Expressor XAMP or what ever you have on your machine.
Can you send me the HTML code which you use to initialize plugin on your page?

from facebook-album-browser.

dchicon avatar dchicon commented on May 28, 2024

I test it on Plunker, and i load your code into my server.

<title></title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script type="text/javascript" src="http://www.applicare.es/php/mile/jquery.fb.albumbrowser.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
      $(".fb-album-container").FacebookAlbumBrowser({
            account: "TIERRACAFE",
            accessToken: "871028626302917|D52bS7KyJaluNK6KH4YgzmQLcRI",
            skipAlbums: ["Profile Pictures", "Timeline Photos"],
            //onlyAlbum: "10150310813623951",
            showComments: true,
            commentsLimit:3,
            showAccountInfo: true,
            showImageCount: true,
            showImageText: true,
            shareButton: true,
            albumsPageSize: 0,
            photosPageSize: 0,
            lightbox: true,
            photosCheckbox: true,
            likeButton: true,
            shareButton: true,
            addThis:"ra-50360b776f77c6a6",
            photoChecked: function(photo){
                console.log("PHOTO CHECKED: " + photo.id + " - " + photo.url + " - " + photo.thumb);
                console.log("CHECKED PHOTOS COUNT: " + this.checkedPhotos.length);
            },
            photoUnchecked: function (photo) {
                console.log("PHOTO UNCHECKED: " + photo.id + " - " + photo.url + " - " + photo.thumb);
                console.log("CHECKED PHOTOS COUNT: " + this.checkedPhotos.length);
            },
            albumSelected: function (photo) {
                console.log("ALBUM CLICK: " + photo.id + " - " + photo.url + " - " + photo.thumb);
            },
            photoSelected: function (photo) {
                console.log("PHOTO CLICK: " + photo.id + " - " + photo.url + " - " + photo.thumb);
            }
        });

    });
</script>

from facebook-album-browser.

dchicon avatar dchicon commented on May 28, 2024

how to attach a html code?

from facebook-album-browser.

dchicon avatar dchicon commented on May 28, 2024

El 04/08/2015, a las 10:39, Dejan Stojanovic [email protected] escribió:

That is weird. Make sure you took the latest code from the GitHub.
Make sure you are running page from some local web server, IIS Expressor XAMP or what ever you have on your machine.
Can you send me the HTML code which you use to initialize plugin on your page?


Reply to this email directly or view it on GitHub.

from facebook-album-browser.

dchicon avatar dchicon commented on May 28, 2024

Sent. Thanks again, Dejan

from facebook-album-browser.

dejanstojanovic avatar dejanstojanovic commented on May 28, 2024

I did the same test in Plunker demo and it worked. Check the screenshot
addthis
I just added addThis value, the same one you provided

from facebook-album-browser.

dejanstojanovic avatar dejanstojanovic commented on May 28, 2024

By the way, take the latest as I just updated code for updating dynamically AddThis URL. It points to Facebook location of the photo

from facebook-album-browser.

dchicon avatar dchicon commented on May 28, 2024

ufff... gremlins invades my imac.
with your new test.html and codes loaded into my server... it´s doesn´t work!!
I fell like a stupid.
captura de pantalla 2015-08-04 a la s 12 45 14

from facebook-album-browser.

dchicon avatar dchicon commented on May 28, 2024

There are 2 shareButtons options in test.html. Is it ok?

from facebook-album-browser.

dejanstojanovic avatar dejanstojanovic commented on May 28, 2024

Relax, we'll find what is wrong, no worries :)
I think number of buttons depends on the settings you have related to your pub-id from AddThis. I believe you can add more through AddThis settings when you login to their dashboard.
Check with pub-id I added in test.html, that one for sure has 4 buttons. By the way, I limited number of buttons to 4, so in case you have more it will only show up only first 4 :)

from facebook-album-browser.

dchicon avatar dchicon commented on May 28, 2024

tested with your test.html, and codes uploads into my server.
Broken arrow again :(
I think gremlins are taking a bath into motherboard. Can´t you hear the party?
captura de pantalla 2015-08-04 a la s 13 16 11

from facebook-album-browser.

dchicon avatar dchicon commented on May 28, 2024

look:
if i click your "checkout demo on plunker" and i change the body for the one of your new test.html... It´s work!!
Like this, plunker work with the codes uploads on your server!

uppps... "checkout demo on plunker" doesn´t work anymore
{
"statusCode": 400,
"error": "Bad Request",
"message": "Invalid cookie value"
}

from facebook-album-browser.

dejanstojanovic avatar dejanstojanovic commented on May 28, 2024

OK, let's do it this way. Since I used test.html to test and develop everything, grab latest from GitHub, set it up and run on your machine. Than one should work definitely.

I am pretty sure it has something to do with the cached stuff in a browser, but just to make sure, run the code from GitHub on you local and let me know if you are still experiencing any issues

from facebook-album-browser.

dchicon avatar dchicon commented on May 28, 2024

Sorry Dejan, but github doesn´t work anymore. Same error
{
"statusCode": 400,
"error": "Bad Request",
"message": "Invalid cookie value"
}

from facebook-album-browser.

dchicon avatar dchicon commented on May 28, 2024

Hi Dejan.
Tested on a local host:
with the code of your server it work, and addThis too; but if a I load the actual version of the code into my server... it doesn´t work.

from facebook-album-browser.

dejanstojanovic avatar dejanstojanovic commented on May 28, 2024

Is there any JavaScript error reported by the browser?

from facebook-album-browser.

dchicon avatar dchicon commented on May 28, 2024

Sorry Dejan!, It works now perfectly with your code and css loaded on my server!
Yeeeah!!
Take a look

El 05/08/2015, a las 20:58, Dejan Stojanovic [email protected] escribió:

Is there any JavaScript error reported by the browser?


Reply to this email directly or view it on GitHub.

from facebook-album-browser.

dejanstojanovic avatar dejanstojanovic commented on May 28, 2024

Great. Let me know if you find any issue

from facebook-album-browser.

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.