Skip to content

Extended documentation

Filippo Rossi edited this page Jan 8, 2014 · 21 revisions

MyFacebook Connect comes with 19 settings you can adjust dependently on your needs. You can control many aspects and boost up your MFC copy, building up a rich user experience with ease.

This document contains all the settings MyFacebook Connect is shipped with, commented and explained one-by-one with tips and tricks you can use to enrich your experience with the plugin.

Plugin overview

Version 2.0
Adds templates Yes (6)
Edits templates Yes (1)
Edits core files No

Template edits

header_welcomeblock_guest

MyFacebook Connect edits the header_welcomeblock_guest template. It adds the following piece of code:

&mdash; <a href="{$mybb->settings['bburl']}/myfbconnect.php?action=fblogin">{$lang->myfbconnect_login}</a>

You might place the myfbconnect.php?action=fblogin link wherever you want in your templates. When the user clicks on it, it the login/registration process will immediately start up.

Using an image instead of a button

MyFacebook Connect edits your header_welcomeblock_guest template adding a link next to the normal Register button. Clicking on it causes the login/registration process to begin, but since it's just a normal link, you can place it anywhere and place anything inside it.

If you want to use an image instead of a sad link, you can. Simply follow these steps:

1. Download the image

Save to your computer whatever Facebook login image you want. I'd recommend using the following:

It has been created by Chris Wallace from 365psd.com.

Lastly, upload the image to your /images folder.

2. Edit the template

Open your header_welcomeblock_guest template and find:

<a href="{$mybb->settings['bburl']}/myfbconnect.php?action=fblogin">{$lang->myfbconnect_login}</a>

Replace {$lang->myfbconnect_login} with the following code:

<img src="/images/imagename.extension" />

Replace imagename.extension with whatever you have named the image and you're done.

Configuration options

1. Master Switch

This is the main option which controls everything. Disabling it means totally deactivating the plugin. Everything will refuse to work and every attempt to login with Facebook will "fail" (the user will be simply redirected to your Homepage).

This is very useful if you want to temporary disable the plugin without uninstalling it.

2. App ID

The App ID is one of the required fields and should be filled with the Facebook Application ID token according to the instructions provided into the installation doc. Nothing more to say about it.

3. App Secret

The App Secret is one of the required fields and should be filled with the Facebook Application Secret token according to the instructions provided into the installation doc. Nothing more to say about it.

4. One-click registration

MyFacebook Connect comes with 2 different types of registration. Both of them are great, but you have to choose unfortunately.

If this option is enabled, the plugin lets you register through Facebook with only one click and one front-end redirect. This means that every user who would like to login into your board and he doesn't have a registered account will be registered and logged in with a single click of a button.

With this option disabled, every user who hasn't got a registered account and logs in with Facebook will be prompted to choose a new username and eventually an email address different from his Facebook one. By default, inputs will be filled with his existing Facebook data but they'll be able to choose whatever username and email they'll want. In addition to this they'll be asked to select what data to import from Facebook, respecting their privacy in a better way than the simple one-click registration process.

I'd recommend to disable this option, although it is enabled by default. Privacy is top priority to me, but since you can send a PM upon registration automatically, you might put there all the things to do after a single click registration.

5. After registration usergroup

This option lets you specify an usergroup to put the Facebook-registered users straight after they register. By default it's set to 2, which equals to "Registered" usergroup, but I'd recommend to create a specific usergroup with some unique styles (or permissions, if you want to). This will lead into a smoother user experience: Facebook users will be immediately recognized by their username's color, for example.

You are limitless here: just create a special usergroup with your desired specs and then just select it.

6. Post on user's wall

Version added 2.0

This feature lets you post a message onto the user's wall when he registers or links his account to Facebook. Publishing permissions are required for this to work and they will be asked automatically when users will login for their first time (or if they have not already granted them).

This switcher toggles another field.

6.1 Custom post message

Version added 2.0

This field is toggled by the setting above and contains the default message to post on user's wall when they register or link their Facebook accounts to your board. Due to the heavy amount of data exchanged in this process, the very first login with Facebook will actually take a bit more than normally. However, users generally don't notice this small delay.

You are allowed to use some variables here:

{bbname} This will be converted to your board's name.
{bburl} This will be converted to your board's url.

7. Allow only validated users

Version added 1.0.3

Enabling this option will let your board be free of bots by allowing only verified Facebook accounts to register. Verified accounts are those Facebook users who have verified that they are humans by sending a code to their phones and entering it on Facebook.

This option is disabled by default.

8. Send PM upon registration

Enabling this option will cause 3 other options to appear. Enabling it, you are able to send a PM to the newly registered users who decide to use MyFacebook Connect to login.

8.1 PM subject

This is the subject of the PM which will be sent to the user. By default is set to "New password", but you can change it to whatever you like.

8.2 PM message

This is the message of the PM which will be sent to the user. You are allowed to use two variables here:

{user} This will be converted to the recipient's username when the PM will be sent.
{password} This will be converted to the recipient's randomly generated password when the PM will be sent.

You can change the text to whatever you want, but make sure you include at least the {password} variable which is the main aim of why the PM is being sent.

8.3 PM sender

This is the UID (User ID) of the user who will be recognized as the sender of the PM. By default this field is left blank which means the user will be 0 (formerly, MyBB Engine). You can change it to whatever you like, but make sure the User ID exists before filling the field.

Synchronization options

This category contains all the options which controls the synchronization, aka importing of all the infos from users' Facebook accounts. Enabling and disabling them from the ACP will cause them to appear or not into users' control panels.

In fact, users are able to choose what infos to share with their Facebook account. Avatar, cover (if Profile Picture plugin is installed), birthday, location, sex, biography, first name and last name are all the available kind of data which can be turned on and off as you may like.

At every login, their infos are fetched and inserted with a synchronization. In almost all cases, at every login and every time the user updates his settings from his Control Panel all selected infos are fetched and inserted into the database, overwriting old data. This leads into a dynamic and ever up-to-date connection between MyBB and Facebook.

9. Sync avatar and cover

Enable this option to let your users choose to sync or not avatar and cover. Obviously, only if present into their Facebook or with permissions granted.

10. Sync birthday

Enable this option to let your users choose to sync or not birthday. Obviously, only if present into their Facebook or with permissions granted.

11. Sync location

Enable this option to let your users choose to sync or not location. Obviously, only if present into their Facebook or with permissions granted.

This switcher toggles another field.

11.1 Location Custom Profile Field

This field is toggled by the Sync location option and is required to work properly. It contains the Location Custom Profile Field and can be modified as you may like. Select the Custom Profile Field you want to fill with the Location and you're done.

If this field is left blank, or the field doesn't exists in the database, it won't work (but no errors will be generated and the plugin will continue with the synchronization without any ugly PHP feedback).

Make sure to select one option. By default, MyBB's core location field is selected.

12. Sync biography

Enable this option to let your users choose to sync or not biography. Obviously, only if present into their Facebook or with permissions granted.

This switcher toggles another field.

12.1 Biography Custom Profile Field

This field is toggled by the Sync biography option and is required to work properly. It contains the Biography Custom Profile Field and can be modified as you may like. Select the Custom Profile Field you want to fill with the Biography and you're done.

If this field is left blank, or the field doesn't exists in the database, it won't work (but no errors will be generated and the plugin will continue with the synchronization without any ugly PHP feedback).

Make sure to select one option. By default, MyBB's core bio field is selected.

13. Sync First and Last Name

Enable this option to let your users choose to sync or not their names and last names, together. Obviously, only if present into their Facebook or with permissions granted.

This switcher toggles another field.

13.1 First and Last Name Custom Profile Field

This field is toggled by the Sync First and Last name option and is required to work properly. It contains the First and Last Name Custom Profile Field and can be modified as you may like. Select the Custom Profile Field you want to fill with the First and Last Name and you're done.

Since MyBB doesn't come with a First and Last Name Custom Profile Field by default, if you want to use this sync option you have to create one Custom Profile Field with specifications similar to the Location one. Its ID will be used to insert the data coming from Facebook during every synchronization.

If this field is left blank, or the field doesn't exists in the database, it won't work (but no errors will be generated and the plugin will continue with the synchronization without any ugly PHP feedback).

Make sure to select one option. By default, nothing is selected.

14. Sync sex

Enable this option to let your users choose to sync or not sex. Obviously, only if present into their Facebook or with permissions granted.

This switcher toggles another field.

14.1 Sex Custom Profile Field ID

This field is toggled by the Sync sex option and is required to work properly. It contains the Sex Custom Profile Field and can be modified as you may like. Select the Custom Profile Field you want to fill with the Sex and you're done.

You might edit MyFacebook Connect language file to translate the fillers for "male" and "female", which are in English by default.

If this field is left blank, or the field doesn't exists in the database, it won't work (but no errors will be generated and the plugin will continue with the synchronization without any ugly PHP feedback).

Make sure to select one option. By default, MyBB's core sex field is selected.

Please read carefully the installation instructions.

Clone this wiki locally