Not all the comments visible when pulling a post using Facebook graph API iphone

前端 未结 3 1176
执笔经年
执笔经年 2021-01-23 08:49

I searched through all the posts about Facebook graph API and didn\'t find anything about it. Here\'s the issue.

I\'m working on the iPhone app for one company. And for

3条回答
  •  别那么骄傲
    2021-01-23 09:19

    Just wanted to add this works: Grab the feed for all the basic wall post information, then grab the comments for each post individually. Requires more complex refresh methods, and a little trickery (trust your comments array over the JSON comment count number where you can) but at least it gets it right.

    I was grabbing the feed to get post_id's, then grabbing each post individually to get the correct information. However, just 2 days ago I had some really funny stuff going on where the same facebook post request in iOS would return 2 of the 3 comments, the Chrome browser returned 1 comment (the latest one) and the request in Firefox returned the other 2 comments but not the newest one. Didn't matter if I was logged in or not when using the browser to test the response. This happened for about half the posts with comments.

    So I tried using the access token in the URLs on the Facebook Developers site and changing the request to this particular post - returned all the correct information straight away! It got to the point where I even created a new Facebook App to get a new app ID, and a fresh project in XCode to eliminate all possibilities - didn't make a difference.

    So thanks to this thread I tried the {post_id}/comments GET, and it works correctly. I've done the same thing for likes to eliminate that potentially breaking further down the line as well!

提交回复
热议问题