tumblr/tumblr.js

Repeating posts in Dashboard API

andrecbr opened this issue · 2 comments

Hi, that's my code:

client.userDashboard({
    type: 'photo',
    limit: 20,
    offset: offset
}).then(function (result){
    response.send(result);
}).catch(function (err){
    console.log('ERROR', err);
});

I'm using a infinite scrolling way and after some pages the result starts looping and is equal.

I increment the offset like this:

offset = _offset + limit + 1;

P.S. Sorry my english (=

I have found a solution!

Using before_id param to paginate instead offset.

From https://groups.google.com/forum/#!searchin/tumblr-api/before_id/tumblr-api/dXWaJv9gKxY/SKxWsx7af5UJ.