Can't load more results

Hi! I need some help with loading more results. I use the google places api to gather the results. I made an button to load more results, but it only works one time. The button I use for it is “laat meer.”, I want my users to get more results then only 2 pages. How can I fix this? Thanks!

what you need to do is to store the next page access token somewhere and when making the next call with only this token, you need to store the next page access token somewhere, because you get a new one for every call/next page.

Hi David! thanks for the fast reaction. Can you specify it a bit more? I don’t really understand it.

So right now I guess you are making an api call to get the results.

You get the following details of 20 results:

Place details: rating, name and so on

if there are more then 20 results you also get an nextpagetoken or pagetoken (don’t know exactly how its called in google places api)

you need to do the same call again with just this token and without any other parameters.

Then you will get the next 20 results and if there are more than 40 results another pagetoken, for the next call.

You need to use those tokens to get the next 20 results every time.

Hi David. thanks again! How can I get this “nextpagetoken”?

I currently use this " show next ", but this isn’t the right token I guess?

When you make the google places api call, you get this token, if there are more than 20 results available automatically.

What you need to do is to initalize your api call again, there you will see this token.

This has nothing to do with your repeating group. You only get 20 results from google places api per call.

Hi! How can I initalize this api again? I used it as a bubble plugin, so I just needed to get the api key from the, and put they keys in the field. When I add an api via the api connector from bubble I can initalize it, but how do I initalize the places api?

This topic was automatically closed after 70 days. New replies are no longer allowed.