This is a public feed aggregator.
Check out the DEMO
- Facebook Pages Provide the link to a Page's RSS feed. You can find this by a) logging into Facebook b) go to the page - in the left column, choose "Subscribe via RSS" and copy the resulting URL.
- RSS/Atom feeds Provide the link to the feed.
- Twitter Just provide the Twitter screenname. We use Twitter's REST API instead of YQL due to Twitter's [recent discontinuation of RSS].
The key option is feeds. Pass a JSON list, where each object has 3 fields:
- title: Pick a descriptive title
- type: Options are 'rss', 'facebook', or 'twitter'
- id: The full URL or an RSS/Atom feed, or a Twitter screenname
Include JQuery, jquery.jsonp, and so.what.social somewhere in
Include an empty div somewhere in
<body></body>that will be filled in by so.what.social It's nice to include some kind of "loading" animation so your users aren't too shocked when the plugin loads.
<body> ... <div id="activityFeed"> <img id="loading" src="ajax-loading.gif" /> </div> ... </body>
Call so.what.social and pass feeds to it, along with any options. This goes in
- Better error handling. Use try/catch - also, console.log was crashing script in browsers w/o a console. Error - sometimes YQL returns null. This crashes the immediate function, FINISHED++ is never called. There's a better way.
- I added
<a>tags to the post
- 's, giving them links back to the original asset (Tweet, Facebook page, etc). Problem: now the links created by linkify(), for example from a tweet, don't work. They appear to be overridden by the outer
- Minor bug: If a link in text isn't surrouned by spaces, extraneous text (like ...) will be included in the link, sometimes breaking it.
- Incorporate more settings for easy customization without digging into the code.
- URLs for feed-type icons. Perhaps a dictionary that matches with "type"
- Number of posts to show (total)
- Max. posts from any source
- Make the grey link boxes clickable - should take you to the original asset. Depends on original resource type, will have to build a URL (see earlier URL work in feedeater, esp. for Twitter).
- The building of the
- text (POST_ARRAY[COUNT]) is awkward and repetitive. Better way? Wrote build_li function
Notes about backend technology
The Twitter API is working flawlessly. YQL, on the other hand, has some problems. In no particular order,
SELECT * FROM xml WHERE url="wevs"returns null for no reason. Refreshing the page once or twice makes the request go through. At the moment this code will just ignore that particular feed if something like this happens.
- Neither limit nor xml(x) appears to work to limit the number of responses from a query. I've tried various things in the YQL console, all with no success. This directly contradicts the YQL Paging and Table Limits documentation.
- The developer forums, which is where Yahoo! says you should bring bugs and questions, are a wasteland.
After some messing around,
select * from xml seems old and busted;
select * from feed is the new
My work on this plugin was inspired by John Patrick Given's excellent So So Social Plugin. The license will be determined once I hear back from him.