Facebook OAuth

The Facebook OAuth field allows a software developer to implment a Log in with Facebook button or to create a button that asks for additional permission such as the publish permission. It is regarded as bad practice to ask for publish permission as part of the Log in with Facebook flow. To utilize this field the application developer or their client will need to setup a Facebook Application. This field is required to use the Facebook Enterprise Service Bus.

This field does not store data it only provides actions that will run when the field processes an OAuth request.

How to Create

  1. Click the to add a field in your form.
  2. Choose “New Field”
  3. Select the table you wish to add the field to. Most of the time this will be the current table you are on, called the current context.
  4. Enter a field name and click “Choose Type”.
  5. Choose “OAuth - Facebook” from the list of field types.
  6. You will be prompted to provide expressions that will define the critical values required to communicate with Facebook.
  7. You can continue adding fields or click the “Select” button to finish adding.

Features

Field Label

Grid Appearance

Tooltip

OAuth Consumer Keys

OAuth Permissions

Block Association

Implementing a Log in with Facebook Flow

  1. Configure the field with a Facebook Application Id and Facebook Application Secret
  2. Configure the OAuth Successful Actions. If the user is able to login to Facebook and accepts the permissions requested by the application the OAuth Successful Actions will run. Durring the execution of these actions several values are provided by Facebook about the Facebook User. Here the application developer should search the existing users and see if one already has the same Facebook User Id and if they do change to that user and redirect the user to the appropriate next page via an Open Page action. Otherwise a new WorkXpress user should be created and the Facebook data should be stored against that user. Of note it is important when creating a user to generate and save a value into the Username field. Without that field value the change user action will fail.
  3. Configure the OAuth Failed Actions. If the user clicks the cancel button on the Facebook page or does not accept the permissions the OAuth Failed actions will run. The error message and error code generated by Facebook will be presented as run time variables. These values can be used to construct a nice error message to present to the user but should not be show directly to the user because they are cryptic.

Notes

  • If no Open Page actions are defined for the hook that ran then the User will be redirected back to the page the Facebook OAuth Field originated from.
  • When defining an Open Page action as part of the login flow do NOT use the dialog or popup UI treatment.
field type - facebook oauth.txt · Last modified: 2016/09/14 14:19 (external edit)
Copyright WorkXpress, 2020