Follow me on Identi.ca or Twitter or Diaspora*
This is a feedback about installing a self hosted instance of Friendica on a Debian server (Jessie). If you’re not interested in why I use Friendica, just go to “Prerequisite for Friendica” section below.
Frustration about social networks
Being a huge user of short messages, I was quite frustated to spend so much time on my Twitter account. To be quite honest, there is no much I like about this social network, except the huge population of people being potentially interested in what I write.
I also have been using Identi.ca (now powered by Pump.io) for a while. But I tried for a while to manage both networks Pump.io and Twitter by hand and it was quite painful. And something was telling me another social network was going to appear from nowhere one of these days and I’ll be just horrible to try to keep it up this way.
So I was looking for a “scalable” solution not asking too much personal investment. Subscribing to Diaspora* some days ago on the Framasphere pod, tintouli told me to try Friendica.
Hmmm, what’s Friendica ?
Friendica is a content manager you can plug on almost anything: social networks (Facebook, Twitter, Pump.io, Diaspora*,…), but also WordPress, XMPP, emails… I’m in fact just discovering the power of this tool but to plug it on my different social network accounts was quite a good use case for me. And I guess if you’re still reading, for you too.
I tried to use some shared public servers but I was not quite happy with the result, one connector was still missing or public servers were really unstable. So I’m at last self hosting my Friendica. Here is how.
Prerequisite for Friendica
You need to install the following packages:
# apt-get install apache2 libapache2-mod-php5 php5 php5-curl php5-gd php5-mysql mysql-server git
Having a already self-modified /etc/php5/apache2/php.ini, I encountered a small issue with libCurl and had to manually add the following line in the php.ini:
Setting up MySQL
Connect to MySQL and create an empty database with a dedicated user:
# mysql -u root -pV3rYS3cr3t -e “create database friendica; GRANT ALL PRIVILEGES ON friendica.* TO friendica@localhost IDENTIFIED BY ‘R3AlLyH4rdT0Gu3ss'”
Setting up Apache
My server hosts several services, so I use a subdomain friendica.mydomain.com. If you use a subdomain, of course check you do have declared this subdomain in your DNS zone.
I use SSL encryption with a wildcard certificate for all my subdomains. My Friendica data are stored in /var/www/friendica. Here is my virtual host configuration for Friendica stored in the file /etc/apache2/sites-available/friendicassl.conf :
DirectoryIndex index.php index.html
Allow from all
After writing the configuration file, just launch the following commands and it should be good for the Apache configuration:
# a2ensite friendicassl && /etc/init.d/apache2 reload
Setting up Friendica
Get the master zip file of Friendica, copy it on your server and decompress it. Something like :
# cd /var/www/ && wget https://github.com/friendica/friendica/archive/master.zip && unzip master.zip && mv friendica-master friendica
You need to give www-data (Apache user) the rights to write in /var/www/friendica/view/smarty3/ :
# chown -R www-data:www-data /var/www/friendica/view/smarty3 && chmod -R ug+w var/www/friendica/view/smarty3
Ok, I guess we’re all set, lets launch the installation process! Using your web browser, connect to friendica.mydomain.com. First step you’ll see the installation window which checks the prerequisite before installing. Complete if something is missing.
Second step asks the host/user/password of the database, complete and the installation process starts. Hopefully all goes just fine.
Next you’ll have to create a /var/www/friendica/.htconfig.php with the content that the last page of the installation process provides. Just copy/paste, check the rights of this file and now you can connect again to see the register page of friendica at the url https://friendlica.mydomain.com/register . Pretty cool!
Register a user
That’s a fairly easy step. You just need to check before that your server is able to send emails, because the password is going to be sent to you by email. If it is ok, you should now identify on the welcome page of friendica and access your account. That’s a huge step to broadcast your short messages everywhere, but we have some last steps before being able to send your short messages on all the social networks we need.
A small break, create an app for twitter on apps.twitter.com
To send your short messages to Twitter, you need to create an app on apps.twitter.com. Just check you’re logged in Twitter and connect to apps.twitter.com. Create an app called with a unique name (apparently), then go to the Keys and Access tokens page, note the consumer key and the consumer secret. You’ll later need the name of the app, the consumer key and the consumer secret.
Install and configure the addons
Friendica uses an addon system in order to plug on the different third-parties it needs. We are going to configure Twitter, Pump.io and the Diaspora* plug. Let’s go back to our server and launches some commands:
# cd /tmp && git clone https://github.com/friendica/friendica-addons.git && cd friendica-addons
# tar xvf twitter.tgz -C /var/www/friendica/addon
# tar xvf pumpio.tgz -C /var/www/friendica/addon
# cp -a diaspora /var/www/friendica/addon
You need to modify your /var/www/friendica/.htconfig.php file and add the following content at the end:
// names of your addons, separated by a comma
$a->config[‘system’][‘addon’] = ‘pumpio, twitter, diaspora’;
// your Twitter consumer key
$a->config[‘twitter’][‘consumerkey’] = ‘P4Jl2Pe4j7Lj91eIn0AR8vIl2’;
// your Twitter consumer secret
$a->config[‘twitter’][‘consumersecret’] = ‘1DnVkllPik9Ua8jW4fncxwtXZJbs9iFfI5epFzmeI8VxM9pqP1’;
// you Twitter app name
$a->config[‘twitter’][‘application_name’] = “whatever-twitter”;
Connect again to Friendica. Go to settings => social networks, you will see the options for Twitter, Pump.io and Diaspora*. Complete the requested information for each of them. Important options you should not forget to check are:
- Enable pump.io Post Plugin
- Post to pump.io by default
- Should posts be public?
- Authorize publication on Twitter
- Post to Twitter by default
- Post to Diaspora by default
Done? Now it’s time to send your first broadcasted short message. Yay!
Send a short message to your different social networks
Connect to Friendica, click on the network page, write your short message in the “Share” box. Click on the lock , you’ll see the following setup:
It means your short messages will be broadcasted to the three networks. Or more, it’s up to you! That’s my setup, feel free to modify. Now close the lock window and send your message. For me it takes some time to appear on Twitter and Diaspora* and it immediatly appears on Identi.ca.
Friendica offers to take back the control of your data, by broadcasting content on different media from a single source. While self hosting, you keep your data whatever happends and are not subject to companies losing your data like recently Twitpic. Moreover the philosophy behind Friendica pushed me to dig and test the solution
What about you? How do you proceed to broadcast your short messages? Does Friendica offer a good solution in your opinion? Are you interested in the philosophy behind this project? Feel free to share your thoughs in the comments.
LAST MINUTE: hey, this article is on Hacker News, don’t hesitate to vote for it if you liked it!
6 thoughts on “Send the same short message on Twitter, Pump.io, Diaspora*… and a lot more”
Ok, j’ai compris les grandes lignes de votre article mais la langue de Shakespeare et moi c’est une autre histoire, avant nous avions les articles en Français ?
Désolé pour ça, mais le public intéressé était potentiellement très grand, donc je me suis fendu d’un article complet en anglais. Je posterai sans doute de nouveau des articles en français 🙂
In 2012 I had written and soon abandoned a trivial scheduled crossposting tool (https://github.com/liotier/Socialspoon/blob/master/spoonfeed) – Friendica is of course orders of magnitude better in all respects. The only feature I find lacking – or at least different from my personal use case is how it treats Twitter : when I post a link to an interesting article, I post a different version of my description for Twitter and for other destinations – because #140 ! Also, I want hashtags for some destinations but not for others. In my little script, I ended up writing and queuing two entries : one ‘microblog’ (140 characters + hashtags) and one ‘macroblog’ (no limit, no hashtags). There may be better ways, but for some platforms I feel a need to differentiate the content. At the moment, I regressed back to opening a bookmarks folder containing each destination and pasting the content in each form… I definitely have to give Friendica a try !
Yes I also thought a long time ago about coding something myself, but as I said in the article, I kind of felt it was not “scalable”, I mean, come on, we may have a new “cool” social network every month or two months, it’s just impossible to keep the pace and that’s why I thing Friendica is a really interesting solution by connecting to lots of social networks/websites/apps. It’s in my opinion a really elegant solution.
I’ve been searching about some options to manage social network using libre-platforms like identi.ca(/pump.io), diaspora, twitter, g+, etc.
I found friendica as an option thanks to your post, but i have found some issues and so few documentation, could you point me to the right direction for documentation or help.
Great article, thank you. This motivated me to get all my social apps linked into my friendica instance.