Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gallery just imports 25 pictures #44

Open
prinla opened this issue Jan 25, 2018 · 3 comments
Open

Gallery just imports 25 pictures #44

prinla opened this issue Jan 25, 2018 · 3 comments

Comments

@prinla
Copy link

prinla commented Jan 25, 2018

Whatever gallery I choose from my Facebook page, the plugin only parses 25 pictures...
Any solution/explanation?
Thanks
Oliver

@loopion
Copy link
Contributor

loopion commented Jan 25, 2018

I’ve took a look recently because I had je same problem. This is because by default Facebook return only 25 elements. If you want to return more, the a pagination in je JSON response must be develop and it’s currently not the case.

@prinla
Copy link
Author

prinla commented Jan 25, 2018

Thanks...
For the moment I found a turn-around by add . '&limit=100' to line 304 of the facebook.php

. $config->get('facebook_common_settings.application_secret') . '&limit=100';

Now it shows 99 pictures. Changing the limit to over 100 doesn't change anything!

Is somebody here that is able to adjust the facebook.php so all pictures could be rendered?

@prinla
Copy link
Author

prinla commented Jan 25, 2018

Also it would be great having this pagination to show only a defined number of pictures on the first sight and put a show-more-button that allows to show the rest of the pictures.

For the moment I found a turn-around by adding this to my partial-gallery-template:

{% set firstTen = album.photos|slice(0, 10) %}
{% set showmore = album.photos|slice(10, 100) %}

<div id='facebook-gallery'>
<div id='facebook-gallery-photos'>
{% for photo in firstTen %}
<div class="fbpictures"><a href="{{ photo.source|raw }}" class="mygallery"><img src="{{ photo.source|raw }}"/></a></div>
{% endfor %}
<div id="q1" style="display:none">
{% for photo in showmore %}
<div class="fbpictures"><a href="{{ photo.source|raw }}" class="mygallery"><img src="{{ photo.source|raw }}"/></a></div>
{% endfor %}
</div>
<button class="morepictures" onclick="myFunction()">More Pictures</button>
</div>
</div> 

An then adjusting the show-more button by javascript on click to change the display:none to display:block

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants