1

I am using Graph API to authorize a user with my app to fetch posts from their timeline and from their liked pages.

I'm able to fetch all posts and save them. But, when I fetch again after a period of time it includes both the new posts and old ones which creates duplicate entries. I only want the new posts which are not fetched yet. I know about the webhooks in facebook. But, I want to know any other way to do this just like twitter (using since_id).

NB: I'm using spring-social-facebook for these operations.

Looking for some ideas.

Abhishek Ramachandran
  • 1,160
  • 1
  • 13
  • 34

1 Answers1

1

I think that you can use since and until parameters to filter the results. Try this call: https://developers.facebook.com/tools/explorer/135669679827333/?method=GET&path=me%2Ffeed%3Fsince%3D1%20january%202017%26until%3Dnow&version=v2.5

You can store your lastUpdateDate and then use since lastUpdateDate until now.

canillas
  • 414
  • 3
  • 13