Welcome Guest, Not a member yet? Register   Sign In
Caching and combing feeds from Facebook, Twitter and Instagram
#2

[eluser]boltsabre[/eluser]
I've never done it myself, but by the sounds of it you're make a request to FB (I'll just stick with that for now), getting the last XYZ number of posts.

I'd just write them direct into an array (the feed url, data, etc) - basically you make your request, loop over the results and write them into your array - and cache that array for 3600. Saves mucking around with another layer of complexity, no need for DB hits, etc.
Alternatively, as you're looping over your results you could write it direct into a string with html markup if you don't want to do it in your view and cache the string. However, then you are stuck with that "html" markup where ever you want to display your feeds, very hard to alter. Your choice, whatever works best for you!

Does that help?


Messages In This Thread
Caching and combing feeds from Facebook, Twitter and Instagram - by El Forum - 01-22-2013, 05:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB