Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Go to website https://developers.facebook.com/ and log into Facebook account.
  2. Click "My Apps" in right upper corner, then "Create APP".
  3. Fill in "Display Name" field. That name will be visible in Facebook Login form in web application. It is recommended to use combination of application and institution names, e.g. "dLibra - Our Digital Library".
  4. "Contact Email" field should contatain email of person responsible for facebook login configuration. By default it takes creator email.
  5. Create App ID.
  6. Set up Facebook Login.
  7. Then choose "WEB" option.
  8. Fill in "Site URL" field with your web service address, e.g. "https://our-digital-library.com" (without context path). Then confirm.
  9. Go to "Settings" -> "Basic".
  10. Fill in "App Domains" with domain name, eg. "our-digital-library.com".
  11. Fill in "Privacy Policy URL", eg."https://dingo.psnc.pl/en/privacy-policy/"), optionally "Terms of Service URL".
  12. Optionally upload "App Icon". It will be visible in Facebook Login form.
  13. Set application category. Based on facebook categories description, dLibra belongs to "Entertainment" category.
  14. Save changes.
  15. Copy "App ID" and "App Secret".
  16. Go to permissions panel "App Review" → "Permissions and Features" and set "Advanced Access" for email using "Request Advanced Access" button
    Image Added
  17. Click switch near "In development", then confirm with "Switch Mode". "In development" should change to "Live". In means that application was successfully activated.
  18. Edit file "user-providers.xml" on "WEB-INF/conf" path web application directory. Uncomment FacebookUserInformationProvider node and replace CLIENT_ID and CLIENT_SECRET with previously copied values.
    user-providers.xml

    <pl.psnc.dlibra.web.comp.user.oauth.facebook.FacebookUserInformationProvider>
        <configuration>
            <loginPage>${homepage}/dlibra/login</loginPage>
            <logoutPage>${homepage}/dlibra/main?action=LogoutAction</logoutPage>
            <methodNameResourceKey>LoginComponent.uip.facebook.name</methodNameResourceKey>
        </configuration>
            <additionalConfiguration>
            <clientId>CLIENT_ID</clientId>
            <clientSecret>CLIENT_SECRET</clientSecret>
        </additionalConfiguration>
    </pl.psnc.dlibra.web.comp.user.oauth.facebook.FacebookUserInformationProvider>


  19. Restart web application server. Then, it should be possible to log into web application with Facebook account.

...