How to retrieve unread tweets effectively using Since_id & max_id?


Hi, i’ve read from this link to understand since_id & max_id. If there are 20 tweets in the stack & if our since_id is 1, the count 5 gives us the tweets 20-15. Now, i’m missing the tweets from 1-15. I know to iterate by setting max_id = 15. But, after the max_id reaches 1, it will read the tweets which is older than 1. i.e the tweets below 1. Now, what i want to know is, how to set/adjust max_id & since_id to retrieve only the unread tweets without duplication?



I need your help. I’m struggling from the past few days to resolve the below issue.
Do you know how to iterate by setting max_id=15 to read the tweets from 1-15 ?

Could you please help me .