Hi All, hope you had a great holiday.
I have created a WP plugin that requests Twitter timelines and Facebook statuses and mix them together with your WordPress posts (support custom post types) and then display them in reverse chronological order.
On the client website (for whom I created the plugin, viewable at http://projects.starsites.co.za/Shimmer/) I also use jQuery tabs to have a tab for All, Facebook, Twitter and WordPress separately. The plugin works by having a Shortcode where I can set which sources to use and output, it then fetches the information from Facebook and Twitter and WordPress, cache the fetched info for 5 minutes (to be used for next few hits; stored as a serialized array in a file) before having to fetch it again. Next the information gets parsed and handled according to the source and convert the date to the correct formats. For both Twitter and Facebook their respective API are used to fetch the data.
Now my 2 Questions where I need help:
- On the first page load in a while (to clear the cache), only the "all" tab's shortcode gets executed and returned, but a page refresh (with an active cache) all tabs are populated. How should I fix this? Is it because the Facebook might take a little bit longer to fetch the data?
- How would I go about paging the timeline results? Currently a very long list is displayed. Basically I want to know which name for the paged variable should I use, that will not clash with built-in functionality, but will bot be stripped by WordPress
Any help will be greatly appreciated.
The plugin I created needs a few other fixes and modification before it will be released on the WP Plugin Repository for all to use. The plugin also allow external functions to handle how which data source should be displayed.
Starsites - Web Systems