1

I have seen Facebook's API Docs. It provides describes well how to access the Graph API. I want to make a request to retrieve Page Posts and Comments.

I am getting 25 posts in 1 API call with paging parameters. Paging Parameters - Next And Previous:

"paging" : {
        "previous" : "https://graph.facebook.com/v2.8/18470423232708318849/feed?fields=id,permalink_url,message,type,created_time,updated_time,from,picture,comments%7Bid,message,comment_count,created_time,attachment,from,like_count%7D,likes%7Bid,name,pic,profile_type,link,username%7D&since=14434384117080&access_token=EArtertACEdEose0cBAGZC7CFAuxf8ReCxFQDDNtHRD8DupnExZBOertreterIORXaNlWO8SpYCScEsZAyKYv14faWew6ruqDaMb2g5BuSbZCAn7JlZArtertrtesf9ijJIHbBNfhD3dVUw0fTNbbZCpt27oUTP9pCZAfq70h6RDHZAvY5LPlV8WVti0jjD4vxmAZDZD&limit=25&__paging_token=enc_AdBYIq84ZCXzcFl9PkfsZC1aTImpBtNet70MvxmdXHPSvY7vk5NizXmDFOMDnkRFANiOKc8lBLsoSrtrearAnHblJDOE2EyV25sZBo2rvPXdyhSJrteApXEgZDZD&__previous=1",
        "next" : "https://graph.facebook.com/v2.8/18470423232708318849/feed?fields=id,permalink_url,message,type,created_time,updated_time,from,picture,comments%7Bid,message,comment_count,created_time,attachment,from,like_count%7D,likes%7Bid,name,pic,profile_type,link,username%7D&access_token=EAACEdEose0cBAGZC7CFAuxf8ReCxFQDDNtHRD8DupnExZBOIORXaNlretretrWO8SpY34tgfgfCScEsZAyKYv14faWew6ruqDaMb2g5BuSbZCAn7JlZAsf9ijJIHbBNfhD3dVUw0fTNbbZCpt27oUTP9pCZAfq70h6RDHZAvY5LPlV8WVti0jjD4vxmAZDZD&limit=25&until=1468235344018&__paging_token=enc_AdD0urtertrt5zUYkQjANrFVG7nVMfkftKfRpIDdVVJd4RGqJy6j8I8O9kWMVOIS09uKGl5SPsg66oGZAU8ZBEc0qmnVwvLqG8qwGKbe8OfZAEJ9PgRFjZBAZDZD"
    }

Now I want to retrieve next posts and comments using these parameters. I can make a separate request as a new API call using the URL:

me/feed?fields=id%2Cpermalink_url%2Cmessage%2Ctype%2Ccreated_time%2Cupdated_time%2Cfrom%2Cpicture%2Ccomments%7Bid%2Cmessage%2Ccomment_count%2Ccreated_time%2Cattachment%2Cfrom%2Clike_count%7D%2Clikes%7Bid%2Cname%2Cpic%2Cprofile_type%2Clink%2Cusername%7D&limit=25&until=1482470132&__paging_token=enc_AdD0urtertrt5zUYkQjANrFVG7nVMfkftKfRpIDdVVJd4RGqJy6j8I8O9kWMVOIS09uKGl5SPsg66oGZAU8ZBEc0qmnVwvLqG8qwGKbe8OfZAEJ9PgRFjZBAZDZD

But this approach will consume a separate API call, so it is a bit inefficient. Do I need to use batch Facebook API calls?

closed as off-topic by Mohith Shrivastava, Santanu Boral, superfell, Eric, Tushar Sharma May 15 '17 at 6:01

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Programming questions not specific to Salesforce are off-topic here, but can be asked on Stack Overflow." – superfell, Eric, Tushar Sharma
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Yes, yes you should if that is your use case – Eric May 15 '17 at 3:58