markvaughn2006 Posted January 11, 2011 Share Posted January 11, 2011 If this is the wrong section sorry, I'm thinking this some kind of ajax call. On Facebook, if you scroll all the way down and click "Older Posts" and it looks like it is loading and then drops down with older posts. Could someone please point me in the right direction of how this might be done?? Thanks sooo much! Link to comment https://forums.phpfreaks.com/topic/224026-how-does-facebook-do-this/ Share on other sites More sharing options...
trq Posted January 11, 2011 Share Posted January 11, 2011 You would simply find the visible screen area, work out when a user is near the bottom of the screen, make an Ajax call to load 5-10 more articles. Link to comment https://forums.phpfreaks.com/topic/224026-how-does-facebook-do-this/#findComment-1157718 Share on other sites More sharing options...
Omirion Posted January 12, 2011 Share Posted January 12, 2011 We know that: All posts are in a DB somewhere. So lets say: we have n posts displayed. And there are m posts in total m>n So we:(in theory) Make an ajax request to a PHP script that gets x posts from the DB. The PHP script then returns the posts. insert into array. foreach(item in array){display html + post} ??? Profit!! Feel free to replace m, n , x with whatever numbers you want. and PHP with python, .NET , ASP , Java , C etc... Link to comment https://forums.phpfreaks.com/topic/224026-how-does-facebook-do-this/#findComment-1158156 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.