Updated How to: Friendica’s Facebook connector (markdown)

Tobias Diekershoff 2016-04-17 16:50:08 +02:00
parent 4b40ca0c92
commit 54ce715980

@ -1,135 +1,2 @@
> # Note
> **Facebook Connector is deprecated. Please use Facebook Post Connector and Facebook Sync plugins**
***
### 1) Configuring the Facebook connector as a user
_Note: Special admin instructions are in the second part this document. The first section is for all users._
The Facebook connector is an addon which 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.
Its almost as if your Facebook contacts had become Friendica users themselves. And you dont even have to configure contacts separately your entire Facebook friend list imported, and updated if new friends are added.
**Activating the Facebook connector for your user account**
Assuming that your admin has installed the Facebook connector, it can be enabled by going to _Settings > Connector Settings > Facebook Connector Settings_. When you use it for the first time, you will be taken to Facebook for confirmation.
**Configuring the Facebook connector (Facebook side)**
Enter your Facebook user name and password and let the application (the connector) do everything the options suggest.
While on the Facebook side of things, also figure out who should be able to see posts from Friendica to Facebook a fairly sound suggestion would be your Facebook friends. This setting only takes effect when your Friendica post is public not when you post to a private group you have defined in Friendica.
So assuming you accept the above suggestion, a public Friendica post would now also go to all your friends on Facebook (but needn't, if you don't want it to - more on that later).
But a Friendica post to a group that includes just two Facebook friends would only be visible to those two friends on Facebook (and anyone else who is in the group, Friendica or Diaspora users etc.).
**Configuring the Facebook connector (Friendica side)**
Once you have clicked okay on Facebook, you will be returned to the Friendica configuration panel for the connector.
![Facebook config panel](images/facebook/fb01.png "The configuration panel for the connector")
There are four options here. The first two concern integration of your Facebook friends:
1) _Post to Facebook by default_ If you select this, all your public posts from Friendica will also go to Facebook. If you dont select it, your public posts will ignore your Facebook contacts. But whichever default behaviour you opt for can be changed on a per post basis by toggling the privacy settings in Friendica's post editor. NOTE: Posts to private groups that you have defined and which include Facebook contacts will _always_ go to those contacts, regardless of what you select here.
2) _Link all your Facebook friends and conversations on this website_ You will most probably want to tick this one in order to see what your Facebook friends are doing from within Friendica (the connector usually doesnt make much sense without it).
The next two options concern _your own_ Facebook wall.
3) Check _On this website your Facebook profile wall conversations will only be visible to you_, if you want to see your own Facebook posts (meaning the ones you publish on Facebook itself or send there via another connector) in your Friendica stream, along with comments from your Facebook friends. You will then see that content personally, but others on Friendica wont be able to (they will only see the posts you issue from Friendica). For most people, this is a sensible option to check (more about that in a moment).
4) _Do not import your Facebook profile wall conversations_ Activating this option means that no one not even you will see the conversations you initiate on Facebook itself. In this case, a post you publish on Facebook will simply stay on Facebook and won't be integrated in Friendica. Most people will probably want to leave this option unchecked.
Activating _neither_ of those two options means that your Facebook profile wall will be merged with your profile wall on Friendica and your privacy settings on Friendica will be used to determine who may see the conversations.
_This can be very annoying to your contacts in some cases!_
Example: If you are cross-posting a lot using other connectors, a Friendica post may go to your blog on Wordpress. Perhaps you have a Wordpress plugin that then sends it to Facebook automatically, too. But when it is published on Facebook that way, Friendica will treat it as a separate post and your contacts on Friendica will probably see two identical versions of it within a short space of time (possibly along with huge pix or video links). This kind of duplication will irritate some and confuse others and entertain almost no one. ;)
**Removing or re-authenticating the Facebook connector**
To remove the Facebook connector, click the appropriate link on its settings page. There is also a link there to re-authenticate the connector with Facebook. This is necessary whenever your Facebook password is changed.
**Status updates**
Status updates from your Facebook friends will arrive once an hour. Comments you make to Facebook or posts you send there usually appear there within one or two minutes.
If the site admin has activated the real-time option for the Facebook connector, many things will work much faster. Specifically, anything that is visible on your own Facebook wall becomes almost instantly visible on Friendica, too: threads you start over there, comments you make, mentions/tags etc.
**Contact updates**
The Facebook connector polls Facebook once a day to discover whether you have any new friends there or have lost any.
_Note: Some of the public servers have been forced to switch advanced Facebook connection options off, because they are too resource-intensive on sites with many users. This means that you will often get **even better and faster** Facebook connectivity by hosting your own Friendica site - as the resource problems do not occur on small, private servers. Additionally, you might enjoy the fun of creating your own icon for your Friendica bridge, if you are so inclined._
## 2) Installing the Facebook connector on your own site (for admins only)
If you run your own Friendica site, you will have to work a little harder to establish Facebook connectivity. But the steps are actually very simple.
**Become a Facebook developer**
First of all, you need to be a Facebook member yourself. Then, you need to become a Facebook developer. That might strike you as strange, because youre not actually developing anything, but thats the way it is. Facebook views the connector as a Facebook app you have developed and are registering.
Heres where to go to become a Facebook developer: http://developers.facebook.com/
In the course of this process, you will be able to use your standard Facebook identity (name and password), but will be asked to provide additional verification by giving Facebook a credit card or mobile phone number.
_This doesnt mean that Facebook is going to charge you any money._
It _does_ mean that Facebook now knows one more thing about you. Many Friendica admins consider their mobile phone numbers less secret and sensitive than their credit card numbers.
**Register the Friendica connector as an app**
What the Facebook connector needs in order to work is an _App ID_ and an _App Secret_. When Facebook gives you these at the end of the registration process, you will be copying them to the connectors administration panel in Friendica.
To get these codes, you create a new application on the Facebook developers site and give it a nice name like _My Friendica Bridge_. You neednt give it a name space and you dont need web hosting for it, so you can leave those two fields blank when the first dialog box appears.
At the top of the application page you see next, you can assign an icon and a logo to the application. Use ``http://your-friendica-site/images/friendica-16.png`` for the icon and ``http://your-friendica-site/images/friendica-128.png`` for the logo (inserting the address for your own site).
You also need to enter your email address and the address for your Friendica site. Setting the type of application to _web site_, simply enter the address with a trailing slash: ``http://your-friendica-site/ ``
When you have confirmed and saved all your entries, you will be given the desired _App ID_ and _App Secret.
**Configure the plugin on Friendica**
Friendica now gives you a convenient admin panel for the plugin, _so you no longer need to edit ``.htconfig.php`` manually, as formerly necessary and possibly prescribed in your help files._
All you need to do is go to your _Administration_ settings and visit the _Plugins_. Click to activate the _Facebook Connector_, then click on its name to configure it. (If there is no Facebook Plugin listed, you need to download it first from [friendica Addons](https://github.com/friendica/friendica-addons).) Youll see the two fields where you can enter the _App ID_ and _App Secret_ you have just received. Copy them to those fields and hit _Save_.
At this point, its a very good idea to _Activate Real-Time Updates_ to get Facebook posts as they happen. If you dont, the default Facebook poll interval is one hour. _(This interval can be decreased, but that would affect system resources dramatically and could make the system un-useable depending on the number of Facebook streams/items to process. With real-time updates, system resource usage will be significantly lower overall.)_
As an admin, you also have the option of checking the box to "synchronize comments" - which pertains to the problem of comments occasionally getting missed by the connector. On a private server for yourself and a few friends or family members, you can safely activate this option with no further considerations.
Now, all members of your site can use the Facebook connector as described in the first sections of this document.
_This applies to you, too! While you have now activated the plugin for your site, you havent yet activated it for yourself as a user. Follow the steps at the beginning of this document to do that._
---------------------------
**Restricting use**
A plugin called Facebook Restrict can drastically help save resources on public and community sites with modest server specs. From the moment it is installed, new users will be able to use the Facebook connector to _post_ to Facebook - but will be unable to integrate their Facebook contacts in their Friendica stream. Members already enjoying full Facebook integration are not affected by this.
There's an easy workaround if you wish to give a new user full Facebook connection privileges at a later date: Arrange to meet via chat (or on the phone) and disable Facebook Restrict for a moment while the user gets his or her connector re-configured. Then reactivate the plugin.
---------------------------
**For public/community servers only**
If you are running a public server with many users, you should consider using the lockfile mechanism for your poller before switching the comment synchronization feature on. A lockfile protects you against the problem of having multiple copies of poller.php running. Since that phenomenon could corrupt your database, and can be caused by a large number of Facebook contacts being polled, a lockfile constitutes a very sensible measure. To implement it, decide which directory it should reside in. It should be a directory that is writeable by the web server (e.g. _/var/www/friendica_ ). Then add a line like this to .htconfig.php:
_$a->config['system']['lockpath'] = "/path/to/lockfile";_
So, if you use /var/www/friendica, it would be:
_($a->config['system']['lockpath'] = "/var/www/friendica";_
> **Facebook Connector, Facebook Post Connector and Facebook Sync plugins are deprecated. Please use Facebook Post Connector and Facebook Sync plugins** As of the moment you cannot bridge from or to Facebook with Friendica.