doine pagination logic for both search results and all tweets list