Last year in the summer I've started a project to truly integrate social networks into our Plasma Workspaces. Truly integrating means having all the data available in our system and allowing any application to take advantage of these data, either just for custom displaying or acting on them somehow.

This solution has several parts - auth mechanism, communication with the service, data storage and data presentation.

The current auth mechanism is custom written for each social network, but fully separated and replacable. They are very simple in terms of UI and provide just that - authentication with the web service to fetch data from it. This will be eventuelly replaced by afiestas' WebAccounts thinggy. So any development effort on the auth mechanism should go there.

Data storage. Since Plasma Workspaces already ships with Akonadi by default, there's no need to reinvent the wheel and create a separate infrastructure just for the social media stuff. Akonadi is generic enough and performs reasonably well for our use case.

With that in mind, we can focus on the social networks integration itself, which is done in form of Akonadi resources/agents, which are very easy to write.

Currently there are 4 major social networks out there - Facebook, Google+, Identi.ca and Twitter. The resource for Facebook which lived in kde:akonadi-facebook was splitted into the library part, now named LibKFbAPI (it goes in the path of similar Google library, which is called LibKGAPI) and residing in extragear/libs (kde:libkfbapi) and the resource part itself, which was merged into kdepim-runtime recently and so it's going to be installed by default with 4.11 onwards. Using this resource one can download the Facebook stream (currently loads either last 400 posts or posts up to 3 days back). This includes corresponding likes and comments of the posts. It also syncs your friends, their birthdays, home address and whatnot. There is also code for syncing events and notes, however this not really tested (and the events don't really work at the moment). Furthermore your notifications are synced as well, but nothing is being done with them at the moment. I want these to show up as a regular notifications in your systray, this should be quite easy to do. The resource can also posts new posts with your account, but cannot "like" or comment on posts yet. Akonadi does allow for that, we just need the code in the resource.

Then we have the microblog resource for Twitter & Identi.ca (they have the same API), which I've started from scratch. It's using the same architecture as the Facebook resource - a library communicating with the network and the Akonadi resource sitting on top of that. Its code is completely based on the microblog dataengine from Plasma and currently allows for receiving 20 last posts from the stream as well as posting. Any other functionality is currently missing. This is in git at kde:scratch/mklapetek/akonadi-microblog-ng.

And we are left with Google+. There's not much to say really as there's no public API for G+, which means no data access. Dan Vrátil, the author of libkgapi and Google resources for Akonadi, will add this support once the API is available.

A resource can of course be written for any network with available public API. If the proper serialization is used in the resource, it will automatically work with the social feed. Furthermore, one can also write resource for anything, like upcoming calendar events or new mails and whatnot. By default anything serialized as SocialFeedItem will be displayed in the feed.

We have the data storage, we have interfaces to the networks, so what's missing? Data presentation aka the user inteface. Plasma currently ships with a qml microblog plasmoid, which is quite nice. So I decided to use that as the user interface and started porting it to the new infrastructure. That consists of a qml plugin communicating with Akonadi and providing the content to the qml plasmoid itself. The development is going on in two places - the qml plugin is at kde:scratch/mklapetek/socialfeed and the plasmoid is in a branch "mklapetek/akonadi_port" of kde:declarative-plasmoids.

Alright so here's a summary of tasks left to do. I think they are quite easy, just needs a bit of research on how Akonadi works and getting familiar with the code, which is all just basic Qt4. So if you're thinking about helping up, don't be scared that you'll be dealing with super-complex Akonadi code, you won't ;)

Facebook resource

implement liking posts

implement commenting on posts

fix fetching/storing events

Microblog resource

implement replying

implement retweeting

implement favoriting

implement support for twitter entities

The plasmoid

make displaying post's comments or replies work/not suck

fix scrollbar (that's a general problem with non-uniform-item-heights in qml list views)

display twitter entities (like attached pictures, extend shortened links etc)

make it possible to hide some networks, eg. show only Twitter

SocialFeed (the qml plugin)

finish whatever is missing to support any of the above

merge with some main KDE repo, not sure which one yet

I'd like to see this all in 4.11, but I can't do it all alone. So please step up to any of these single tasks if you have some time to spare, finishing even one task will be awesome and I'll guide you through it. You can either drop an email to kde-pim at kde.org or to me directly to mklapetek at kde.org. Looking forward for your emails.

Let's bring social integration in Plasma Workspaces ahead of its competitors again!