Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Jonathan Sharrock
2,577 PointsSocial Media timelines?
Hi guys,
How would one go about creating a timeline like what Facebook and Twitter have?
What programming language would you use for it to keep expanding as you scroll down the page etc? I know you need a back-end like PHP to store the posts but is the front-end just html/css or is there some JavaScript at work?
I hope you understand what I mean :)
Cheers guys
1 Answer
Kevin Korte
28,149 PointsDefinitely javascript involved for the endless page feature like both Facebook and Twitter have. Basically, use javascript to know when the user is getting close to the bottom of the page, which triggers an ajax call to the server, requesting the next batch of posts. The server responds and passes back all of the data for the next posts, and ajax loads them back to the page as html, hopefully before the user gets to the bottom.