Browser addon: Integrating Facebook experience into diaspora* (HackPrinceton)

TL;DR: Facebook has a monopoly on our relationships. This is good for Facebook but bad for everyone else, as it hinders fair competition in the social networking sector. During HackPrinceton (Nov 10-12), I would like to build a browser addon that allows you to integrate your Facebook(/Twitter/…) experience into whatever social network you choose (we’ll start with diaspora*). By “your Facebook experience”, I mean your news feed, messaging, notifications, and groups - although, the first version will likely focus on just the news feed. I’m looking for fellow undergrad or grad students with experience (or interest, at the minimum) in JavaScript/CoffeeScript who would like to join for 36 hours of hacking madness. Knowing how to develop browser addons and read/parse HTML data and having a Facebook account is helpful but not required.


Disclaimer: Depending on your perspective, this idea may or may not constitute a violation of Facebook’s Terms of Service. Specifically, point 2 under 3. Safety: "You will not collect users’ content or information, or otherwise access Facebook, using automated means (such as harvesting bots, robots, spiders, or scrapers) without our prior permission."
While this addon will not collect and/or store information in any way, shape, or form, and while it is very different from a bot, robot, spider, and scraper, it could still be regarded as “accessing Facebook using automated means”. I know little about law but please take this risk into account. I have a clear opinion of my own about what is right and what is wrong, namely that what is legal and what is moral are two different questions.


Some background:

When you give me your phone number so that I can give you a call, we take it for granted that I will be able to call you - regardless of which mobile network provider you use. When I give you my email address so that you can email me, you can be confident that I can receive your mail irrespective of your email provider. Whether it is Gmail, Yahoo, AOL, Outlook, or one of a thousand others, it truly does not matter.

As you all know very well, (mainstream) social networks today are not like that. Mostly, we are limited to interacting with people using the same social network as us. Facebook users can communicate only with other Facebook users. Twitter talks exclusively to Twitter. Diaspora* is the true exception. As almost everyone gathers where all their friends are, we end up with a giant monopoly (or two).

You can read for yourself in any introductory economics textbook why monopolies are good for the monopoly (that’s Facebook) and bad for everyone else (that’s you and me). Monopolies stifle innovation. Monopolies can do whatever they want. How many people do you know who complain about Facebook and its practices, yet continue to use it? (Add me to that list)

Even a decentralized network like diaspora* surely feels the effects of monopolization. How many people are there who prefer diaspora* over Facebook but who continue to use Facebook because that’s where their friends are (add me that list, too). That’s because it’s a social network and I will only switch to a new social network if all my friends go with me. You’re stuck in a catch-22: I won’t go if you won’t go and you won’t go if I won’t go and so nobody goes. What if we could break that catch-22 by making it possible for people to switch to diaspora* (or another network) and yet keep in touch with their friends who still use Facebook?

It is not in Facebook’s interest to make this happen. In the current scenario in which all of us lose, Facebook emerges as the only winner. Sure, someone should take them to court for monopolistic and anti-competitive behavior. But that could take a while. In the meantime, how about developing a workaround the way that would make Aaron Swartz proud: Using our computers, code editors, and terminal windows?

The plan:

The plan is to develop a browser addon (Firefox + Chrome) that will allow users to integrate their Facebook experience into a social network of their choice, such as diaspora*. The user will have to install the addon in their browser. When the user visits the website of a supported social network, they will be prompted to either allow or deny the addon to display various elements of their Facebook experience on the site.

Then, when browsing their diaspora news feed for example, posts from their Facebook news feed will be displayed, too. The design will be imitated from that of the social network (e.g. diaspora) and a Facebook icon will indicate that the post was pulled from Facebook.

Technical details:

Facebook used to have API endpoints that allowed reading of a user’s newsfeed, notifications, and private messages. This allowed for the development of Facebook apps that would integrate a user’s Facebook experience into a different website. For example, you could have built an app that would allow you to see your Facebook news feed on Twitter. These API endpoints were removed a couple years ago. Therefore, building an official Facebook app is not an option.

Instead, we can follow a 3-step process:
1. Make a request to the user’s Facebook feed/notification/messaging (e.g. facebook.com, facebook.com/notifications facebook.com/messages)
2. Parse the HTML response (to get the data we actually care about)
3. Inject the data into the current page, e.g. the user’s news feed on diaspora

For step 1, our addon will make an XML request to Facebook. Because facebook.com uses a bunch of asynchronous JavaScript to retrieve the news feed, we will instead make our request to the mobile version of Facebook’s (m.facebook.com). Those pages are plain HTML. You may know that browsers usually prevent XML requests to other websites (so-called cross-origin requests). However, this limitation does not apply to browser addons. Hallelujah!

For step 2, we simply take the response to our XML request and extract the data that we care about (. For example, the post author, the author’s profile ID (to display their profile picture), the post content, the like count, the comment count, the timestamp, …

For step 3, we inject the data into the current page (such as a user’s diaspora newsfeed). Browser addons do that using JavaScript. To create a pleasant experience, we imitate the design of the social network when injecting the Facebook posts. A Facebook icon in the top-right corner of the post will be used to indicate which posts are pulled from Facebook.

For the first version, interacting with Facebook posts will require you to visit Facebook. When a user clicks the like or share button on a post that was pulled from Facebook, the original post will open in a new tab on Facebook. Future versions could focus on making that a seamless experience, too.


One: I would love to hear your thoughts
Two: If you are interested in joining for the hackathon, please let me know :slight_smile:

1 Like

Nice idea but wouldn’t this strenthen the monopoly and the importance of facebook!? Because what I see is: I need a facebook-account to use such an AddOn, because you ain’t talink about cross-showing content in any supported network like I can surf around on reddit and see not just my facebook-news-stream but also my diaspora-stream and my Mastodon-toot-feed and other way back when I visit facebook, why can’t I see my twitter-feed and how about instagram and snapchat?

See what I mean? You’re kinda concentrated to facebook but this is an old network that is changing and maybe not the biggest player in the marked forever.

So I like the idea, but I think you shoud take a more cross-view -approach where I can read my news-stream wherever I am, so whenever you “integrate” a new network (like diaspora*) you should create a write/inject -routine but also a read-out -routine to display that content elsewhere. (and of corse, if you like to discriminate facebook a little; feel free to have no display-routine for that XD).

1 Like

Thanks for your feedback, @deusfigendi!

It’s definitely not meant to strengthen monopolization of the social networking space, so I really appreciate you bringing up the importance of supporting networks other than Facebook. Supporting “write/inject” and “read/out” (as you call it :grin:) is certainly where I would love to see this going in the long term.

The reason I focus so much on one network is because the Hackathon is only 36 hours long and that means we’ll have to probably focus on one network to ‘read’ and one network to ‘inject’ into (depending on whether I can get any of you to join me :yum:). So given that limitation, I thought Facebook would be a good pick because (at the moment) it is the social network that has the largest active user base and I’ve witnessed many times (including myself) how people have left Facebook for another social network only to return a few weeks later because they felt like they were unable to stay in touch with their friends.

But I hear you: We need to think beyond just Facebook! Thanks for calling that to attention.

PS: On a side note, Facebook is a particularly important choice for ‘read/out’ because they removed their news feed and messaging API, thereby further reducing possibility of decentralization and competition in the social networking space. With Twitter (and others), you do have those API endpoints which makes it possible to easily integrate their newsfeeds/messaging into another application.

1 Like

I deleted some off-topic comments here. Please stay on topic and only use this thread to discuss the idea outlined in the post. There is no need to post “me too” comments without any additional ideas, context or concerns at this point in time.

2 Likes