22 Sep 2016 Edited #1

How to configure

Administrator
MyFacebook Connect 3.4 is packed with many 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


Adds templates Yes
Edits templates Yes
Edits core files No

Template edits


MyFacebook Connect edits the header_welcomeblock_guest template, adding the {$facebook_login} variable, which resolves to the myfbconnect_login_button template.

You might place the variable wherever you want in your templates. When the user clicks on the link, which points to /myfbconnect.php?action=login, the login/registration process will immediately start up. Note that the login and the registration are handled by the same link. There are not separate buttons for the two actions.

Using an image instead of a button


Clicking on the generated link 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 and upload the image to your server. An image is provided within the package and it's reachable at /images/social/facebook.png.

2. Edit the template


Open your myfbconnect_login_button template and add your image within the login link boundaries.

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 How to install instructions.

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 How to install instructions.

4. One-click registration


MyFacebook Connect comes with 2 different types of registration.

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

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 want. They will also be asked to select what data to import from Facebook, respecting their privacy.

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 registered. By default it is set to the "Registered" usergroup, but I would recommend to create a specific usergroup with some unique styles (or permissions, if you want to). 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. 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.

7. Force operational status


Version added 3.0

Enabling this option will let MyFacebook Connect run even if registrations are disabled. This is particularly useful if you want to allow new registrations only with Facebook.

This option is disabled by default.

8. Send PM upon registration


Enabling this option toggles 3 options. By enabling it, you are allowed 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 import from their Facebook account. Avatar, cover (if Profile Picture plugin is installed), birthday, location, sex, biography, first name and last name are all the available data points which can be turned on and off as you may like.

Upon every login, their infos are fetched and inserted with a synchronization. In almost all cases, upon 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 will not work (but no errors will be generated and the plugin will continue with the synchronization without any ugly PHP feedback).

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 will not 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 must 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 will not work (but no errors will be generated and the plugin will continue with the synchronization without any ugly PHP feedback).

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 will not work (but no errors will be generated and the plugin will continue with the synchronization without any ugly PHP feedback).

By default, MyBB's core sex field is selected.
Rich Conley 28 Jul 2018 Edited
#2
Could you please provide an example of how the code in "myfbconnect_login_button" should be modified so that it will show the "/images/social/facebook.png" button?

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