facebook - What should be the workflow for tag in ColdFusion 11? -


Today I will call & lt; cfoauth & gt; was looking into the tag.

  1. I have created an app on Facebook using my local site URL.
  2. I found the client ID and the secret key.
  3. I have used Login.cfm:

    & lt; Cfoauth type = "facebook" clientid = "***" secretkey = "***********" result = "res" redirecturi = "http://cf11local.com/login.cfm" scope = Email & gt;

  4. I have successfully recovered all my Facebook information in a structure format.

    Now my question is:

    • How do I check in every page that the special user is logged in

      To integrate Facebook functionality into your site, you must follow the steps outlined below:

      1. Provide login option through Facebook
      2. Once e-user clicks the Facebook login button, the user is asked to login in Facebook Received, if the user has not already logged in. If the user is already logged in, then the user will be prompted with a popup to allow him to access the information.
      3. After the user has given permission or the user has already authorized your app, the user will be redirected immediately to your redirect URL, which is specified in the ODT tag's redirection feature and the OAuth The result of the tag attribute. The result will be a structure of the specialty (So far you have achieved it. Thank you for the patient.)
        Answer your question now.
      4. You need to keep this result in the variable session so that it can be added to other pages in the same session. You can do this & lt; Cfset session.fbinfo = # res # & gt;
      5. You can then redirect the user to the desired page using the cflocation tag. & lt; Cflollow url = "desired page" & gt;
      6. On each page, check that the user's login information is in the area of ​​the session or not. If the session does not have login information, then redirect it to the login page.
        & lt; Cfif (isdefined ('session.fbinfo')) & Lt; Cflollow url = "login page" & gt; & Lt; / cfif & gt;
        If the session has login information, then the user is well free to use the site.
      7. Once the user logs out, you must unblock the login token session. You can do that by clearing the user's information from the session using InvalidateOauthAccesstoken ("access token", "facebook")
      8. .
        & lt; Cfset StructClear (session) & gt;

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -