2012-08-17

The Facebook connection:

← Older revision

Revision as of 23:21, 16 August 2012

(5 intermediate revisions not shown)

Line 1:

Line 1:

-

A
[
[w
:
distributed social network|distributed social network]
] is
an Internet
[[w:social network
service
|social network
service
]] that is decentralised and distributed across different providers. The emphasis of the distribution is on portability, interoperability and [[w:Federation (information technology)|federation]] capability. It contrasts with [[w:social network aggregation|social network aggregation]] services, which are used to manage accounts and activities across multiple discrete social networks.

+

[
http
:
//www.friendica.com Friendica
] is
a
[[w:
distributed
social network|
distributed
social network]]
application
that is decentralised and distributed across different providers. The emphasis of the distribution is on portability, interoperability and [[w:Federation (information technology)|federation]] capability. It contrasts with [[w:social network aggregation|social network aggregation]] services, which are used to manage accounts and activities across multiple discrete social networks.

Open standards such as [[w:OAuth|OAuth]] authorisation, [[w:OpenID|OpenID]] authentication, [[w:OStatus|OStatus]] federation, [[w:XRDS|XRD]] metadata discovery, the [[w:Portable Contacts|Portable Contacts]] protocol, the [[w:Wave Federation Protocol|Wave Federation Protocol]], [[w:OpenSocial|OpenSocial]] widget APIs, [[w:microformats|microformats]] like [[w:XHTML Friends Network|XFN]] and [[w:hCard|hCard]], and [[w:Atom (standard)|Atom]] web feeds—increasingly referred to together as the Open Stack — are often cited as enabling technologies for distributed social networking.

Open standards such as [[w:OAuth|OAuth]] authorisation, [[w:OpenID|OpenID]] authentication, [[w:OStatus|OStatus]] federation, [[w:XRDS|XRD]] metadata discovery, the [[w:Portable Contacts|Portable Contacts]] protocol, the [[w:Wave Federation Protocol|Wave Federation Protocol]], [[w:OpenSocial|OpenSocial]] widget APIs, [[w:microformats|microformats]] like [[w:XHTML Friends Network|XFN]] and [[w:hCard|hCard]], and [[w:Atom (standard)|Atom]] web feeds—increasingly referred to together as the Open Stack — are often cited as enabling technologies for distributed social networking.

-

A few
social
networking service providers have used
the
term more broadly
to
describe provider-specific services that
are
distributable across different websites, typically through added widgets or plug-ins
.
Through
the
add-ons, the social network functionality is implemented
on
users' websites
.

+

Friendica is one of the only distributed
social
projects which has a notion of security and privacy and access control. It isn’t an afterthought. Mistpark was designed from
the
ground up
to
support  private communications. Nevertheless there
are
other distributed social projects
.
A large number of developers from around
the
globe are working
on
something known as the “Federated Social Web” – including development teams such as Status.net, Diaspora, OneSocialWeb, SocialRiver, BuddyPress
.

-

== Installation ==

+

At Organic Design we
'
re really keen
to
get to know Friendica more deeply
as
it seems
to be
a really viable alternative to Facebook
that
's set to become much
more
popular as Facebook gets
more and more
fascist
.
We'd like
to
start setting different organisations up
with
Friendica installations
and
getting them federated together
to
form diverse distributed groups
of
activity
and
knowledge
.

-

{{quote|We
'
ve tried very hard
to
ensure that Friendika will run on commodity hosting

+

-

platforms - such
as
those used
to
host Wordpress blogs and Drupal websites.

+

-

But
be
aware
that
Friendika is
more
than a simple web application. It is a

+

-

complex communications system which
more
closely resembles an email server

+

-

than a web server. For reliability
and
performance, messages are delivered in

+

-

the background and are queued for later delivery when sites are down. This

+

-

kind of functionality requires a bit
more
of the host system than the typical

+

-

blog
.
Not every PHP/MySQL hosting provider will be able
to
support Friendika.

+

-

Many will. But please review the requirements and confirm these
with
your

+

-

hosting provider prior to installation.

+

-

+

-

Before you begin: Choose a domain name or subdomain name for your server.

+

-

Put some thought into this - because changing it is currently not-supported.

+

-

Things will break,
and
some of your friends may have difficulty communicating

+

-

with you. We plan
to
address this limitation in a future release. Also decide

+

-

if you wish to connect with members
of
the Diaspora network, as this will

+

-

impact the installation requirements.

+

-

+

-

Decide if you will use SSL
and
obtain an SSL cert. Communications with the

+

-

Diaspora network MAY require both SSL AND an SSL cert signed by a CA which is

+

-

recognised by the major browsers. Friendika will work with self-signed certs

+

-

but Diaspora communication may not. For best results, install your cert PRIOR

+

-

to installing Friendika and when visiting your site for the initial

+

-

installation in step 5, please use the https: link. (Use the http: or non-SSL

+

-

link if your cert is self-signed)
.
|Friendika team}}

+

== Our installation ==

== Our installation ==

-

Installation looks quite straight forward,
but involved a little bit of difficulty because
it uses
URL rewriting
but we already have rewriting activated for other sites
, and we have ''.htaccess'' files diabled, so I had to add our own section in our Apache configuration instead.

+

There's no need to go into too much detail about installation as Friendica's just a standard LAMP application installation.
but
our instllation did
involved a little bit of difficulty because
of an
URL
-
rewriting
conflict
, and
the fact that
we have ''.htaccess'' files diabled, so I had to add our own section in our Apache configuration instead.

{{code|
RewriteCond %{HTTP_HOST} ^friendica\.organicdesign

{{code|
RewriteCond %{HTTP_HOST} ^friendica\.organicdesign

RewriteRule "(^|/)\.git" - [F]

RewriteRule "(^|/)\.git" - [F]

Line 56:

Line 31:

This indicates that the naked domain is somehow resulting in a request filename of ''index.html'', which is strange because our default index file is set to ''index.php''. But this log entry at least shows us a workaround that can be done until the real problem is discovered, which is to simply ignore the ''/index.html'' portion of the filename if it exists, which is why the following rule was used in the rewrite configuration:

This indicates that the naked domain is somehow resulting in a request filename of ''index.html'', which is strange because our default index file is set to ''index.php''. But this log entry at least shows us a workaround that can be done until the real problem is discovered, which is to simply ignore the ''/index.html'' portion of the filename if it exists, which is why the following rule was used in the rewrite configuration:

{{code|1=RewriteRule (.*?){{h|(/index.html)?}}$ /friendica/index.php?q=$1 [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]}}

{{code|1=RewriteRule (.*?){{h|(/index.html)?}}$ /friendica/index.php?q=$1 [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]}}

+

+

== The Facebook connection ==

+

The [https://github.com/friendica/friendica/wiki/How-to:-Friendica%E2%80%99s-Facebook-connector Facebook connector plugin] allows you to interact with friends on Facebook from within Friendica. It is a very powerful feature – because it works in both directions. You can post to Facebook and see the comments your Facebook friends make, and you can see your Facebook friends’ own threads and comments from Friendica, too.

+

+

It’s almost as if your Facebook contacts had become Friendica users themselves. And you don’t even have to configure contacts separately – your entire Facebook friend list imported, and updated if new friends are added.

+

+

== Friendica plugins developed by Organic Design ==

+

One important aspect of getting to know Friendica more deeply is being able to customise it beyond what it's capable of doing out of the box, so we've started learning about the two kinds of plugins, ''addons'' and ''modules''. Addons extend the system by connecting into the various ''hooks'' provided by the software such as post-login, save-profile etc, and modules extend it by adding new functionality accessible from the first path component of the URL.

+

+

=== Short Profile Url ===

+

I'm setting up a Friendica site for a project I work with who wanted a couple of specific requirements from their social networking platform. Friendica seems to fit all their needs except for these two requirements,

+

#they want users profile pages including contact details to be available from a simple ''domain/username'' URL format

+

#they want a specific form containing inputs for Skype, Facebook etc where they enter their contact details

+

I decide to give the first one a go to start with and created a small addon that accepts the basic format of URL and if there's no module of that name and there is a user of that name, it redirects the browser to that user's profile page with the profile tab selected.

+

+

I used the ''init_1'' hook (hooks listed [https://github.com/friendika/friendika/wiki/Plugins here]) which is called early on but after the database is established, to first check if the long format of URL was being requested, and if so redirect to the new short form of URL, and secondly check if the request is for the new short form, and if so, change the local properties of the '''$a''' the global ''App'' singleton to make it think it was a normal profile request.

+

+

Secondly I hooked into the ''app_menu'' hook which occurrs after all the page headers have been initialised so I could populate the '''$a->page['htmlhead']''' property with a link to a JavaScript file which uses [[jQuery]] to update all profile links in the page to the new format.

+

+

The code is in our subversion repository [http://svn.organicdesign.co.nz/filedetails.php?repname=extensions&path=%2FFriendica%2Fshortprofileurl%2Fshortprofileurl.php here].

+

+

=== Simple Details ===

+

Another aspect required for the Friendica project we're working is to have a custom form for entering personal details into the user profile. Many groups using the software don't need all the hundred and one categories of details that come out of the box such as interests, marriage status, music or television taste and yet they often would like to go into more specific detail in some aspects such as contact methods or portfolio links.

+

+

Ideally a plugin would be made which allows the site administrators to have complete control over the presentation of the users profile form, but initially I've made a simple version which allows us to create our own specific form adjustments from the plugins code.

+

+

The PHP part of the code is very basic and simply hooks into ''app_menu'' to add a JavaScript file which does all the form adjustments using jQuery. The JavaScript code is [http://svn.organicdesign.co.nz/filedetails.php?repname=extensions&path=%2FFriendica%2Fsimpledetails%2Fsimpledetails.js here].

== DRFN ==

== DRFN ==

Line 82:

Line 84:

Then we will start working on the Zot! server.

Then we will start working on the Zot! server.

-

-

== Roadmap ==

-

Friendika is one of the only distributed social projects which has a notion of security and privacy and access control. It isn’t an afterthought. Mistpark was designed from the ground up to support  private communications. Nevertheless there are other distributed social projects. A large number of developers from around the globe are working on something known as the “Federated Social Web” – including development teams such as  Status.net, Diaspora, OneSocialWeb, SocialRiver, BuddyPress.

-

-

== My first addon ==

-

I'm setting up a Friendica site for a project I work with who wanted a couple of specific requirements from their social networking platform. Friendica seems to fit all their needs except for these two requirements,

-

#they want users profile pages including contact details to be available from a simple ''domain/username'' URL format

-

#they want a specific form containing inputs for Skype, Facebook etc where they enter their contact details

-

I decide to give the first one a go to start with and created a small addon that accepts the basic format of URL and if there's no module of that name and there is a user of that name, it redirects the browser to that user's profile page with the profile tab selected.

-

-

I used the ''init_1'' hook (hooks listed [https://github.com/friendika/friendika/wiki/Plugins here]) which is called early on but after the database is established, to first check if the long format of URL was being requested, and if so redirect to the new short form of URL, and secondly check if the request is for the new short form, and if so, change the local properties of the '''$a''' the global ''App'' singleton to make it think it was a normal profile request.

-

-

Secondly I hooked into the ''app_menu'' hook which occurrs after all the page headers have been initialised so I could populate the '''$a->page['htmlhead']''' property with a link to a JavaScript file which uses [[jQuery]] to update all profile links in the page to the new format.

-

-

The code is in our subversion repository [http://svn.organicdesign.co.nz/filedetails.php?repname=extensions&path=%2FFriendica%2Fshortprofileurl%2Fshortprofileurl.php here].

== See also ==

== See also ==

Show more