Unlink facebook


Unlink Facebook

/action/v2/unlinkfacebook

This action unlinks a user's account from their Facebook login.
It does so by deleting the user's external id reference from our system, so this action can not be undone for the deleted reference.

In order to use this action, you must have `unlinkfacebook` (and all its parameters) selected and saved in the `User Actions` tab of the applicationsettings page of your Project.

Example 1

Unlinks the a user's account from Facebook connect.

<fm:Form name="input" action="/action/v2/unlinkfacebook" method="POST" > <input type="hidden" name="uid" value="{$$user_id}" /> <input type="hidden" name="secret1" value="{$secret1}" /> <input type="hidden" name="secret2" value="{$secret2}" /> </fm:Form>

Unlink Facebook in the Lost Password Email Template

A link to this action can be included in the Lost Password email template via the $facebookunlinkurl parameter.

The parameters contained in $facebookunlinkurl are listed below.

<fm:UserInfo uid="{$$user.id}"> <p>Hi {$$user.firstname},</p> <fm:If value="{$facebookConnect}" compareTo="1" comparison="="> <p>We have received a request to reset your password, however you have registered for the Community using Facebook Connect.</p> <p>To unlink your account from Facebook <a href="{$facebookunlinkurl}&redirectUrl=/userprofile">click here</a> and then reset your password. <BR><BR> {facebookunlinkurl} {$facebookunlinkurl}&redirectUrl=/userprofile </p> <fm:Else> <p>We have received a request to reset your password. If you didn't initiate this, you can simply ignore this email.</p> <p>Click the following link to reset your password:<br /><br /> {$resetpasswordurl}&redirectUrl=/userprofile&utm_source=notification&utm_medium=email&utm_campaign=Lost+Password<br /><br /> If you can't click this link, copy and paste it into the address bar of your browser and press enter.</p> </fm:Else> </fm:If> </fm:UserInfo>

NOTE: The line that determines whether the Unlink Facebook link is shown ( or the Unlink Account link is shown ) is:

<fm:If value="{$facebookConnect}" compareTo="1" comparison="=">

Parameters provided in $facebookunlinkurl

Using $facebookunlinkurl in the LostPassword email template populates the required action parameters for you.
The parameters contained in $facebookunlinkurl are as follows:

Name Required Description
uidRequiredThe id of the user. Integer up to 11 characters.
secret1RequiredSecret string 1 that authenticates a user so they can update their password. Has to be used together with secret2
secret2RequiredSecret string 2 that authenticates a user so they can update their password. Has to be used together with secret1