There have been quite a few posts relating to Dynamic Login (DL) and Facebook (FB) Integration. I want to thank Data Springs (Chad) for taking quite a bit of time over the past weekend to work through some of the issues relating to the use of the Silent Post option in DL.
This post addresses the specific use case of creating a DNN user account through Dynamic Registration (DR) on the same portal as the Dynamic Login w/ Facebook connect using an http silent post. There are currently three options for creating a DNN user account in DL. FB using the FB UserID, FB using the FB email address and None (or Silent http post). This forum post addresses the third option or how to use the silent post method with Dynamic Registration. So if you don't currently have the DR module installed, this isn't for you. Before getting started it is important to note that you MUST have at least version 04.00.20 of DL installed. This release fixes some workflow related issues, as well as a problem with the $(Email) token not working correctly. One new token was added as well. This token is $(AccessToken) which contains the value of the FB access token or session cookie that FB creates when FB connect is invoked. The cookie has a name like fbs_246757088686355 (your numbers will be different). You can find specific information on creating an Silent HTTP Post in the DL, DR manual and in these forums.
For this example we are creating a new user using their FB UserID as the DNN User Name.
For MY example I have the following options specific to setting up Silent Posting in DL
Facebook General Settings:
User Creation Type: None / Silent Post / Redirect to Thank You
Submit HTTP Post: Creating User Only (you can use whatever option you want here)
Silent Post (Dynamic Form/Registration URL): http://www.youdomain.com/yourDRregi...npage.aspx ?
example:
http://www.mywebsite.com/FBregistration/DynamicRegistration.aspx?
Silent Post Details:
At a minimum ALL of these tokens should be included in your Silent Post:
SPost=True&UserN=$(UserName)&Pass=$(Password)&ConfirmPass=$(Password)&FirstN=$(FirstName)&LastN=$(LastName)&Email=$(Email)
For the next example I'm going to create the DNN User Name using the Facebook email address instead of their FB UserID. I'm also passing in FBUID into DR. In DR, FBUID is mapped to a DNN profile field that I've created called fbUID. This is just an option I created, so if you don't want it, just leave &FBUID=$(UserName) off of the post.
SPost=True&UserN=$(Email)&Pass=$(Password)&ConfirmPass=$(Password)&FirstN=$(FirstName)&LastN=$(LastName)&Email=$(Email)&FBUID=$(UserName)
Here is the list of all tokens available for FB integration:
$(UserID)
$(UserName)
$(FirstName)
$(LastName)
$(DisplayName)
$(Email)
$(Password)
$(PortalID)
$(ModuleID)
$(IPAddress)
$(TabID)
$(CurrentURL)
$(URLReferrer)
$(CurrentLanguage)
$(AccessToken)
So if you wanted to add the new $(AccessToken), just add it to the end of the string using &FBaccess=$(AccessToken). In your silent post replace &FBaccess with whatever short name you've created for this field on your DR page. In fact you should make sure you have ALL the corresponding short name fields set up on DR to match the names used in you silent post.
Once this is complete you should be able click on the FB Connect button, get immediate access to your site using FB authentication and have a new user set up in DNN using the FB UID as the User Name. One of the big advantages of this method is that you can configure whatever completion events that you’d like to in DR once the user has been created in DNN. A welcome email for example. Hope this helps!