Cross os simple web browser for Facebook authentication

I am currently trying to allow users to log in with their Facebook account in my Java application. However, this requires the browser to display the web page under Facebook authentication.

Now I am looking for a β€œbrowser” project that:

  • cross-os
  • Supports single frames (show the page at this URL, without forward / backward / refresh buttons)
  • Supports relatively new web standards (which Facebook uses)
  • Lightweight preferably

I am trying to avoid Eclipse SWT due to all the problems that are required for cross-os to work. This is a relatively small project that I would like to keep simple. The swing-based browser is not an alternative due to the lack of support for new web standards.

Is there any project that does what I'm looking for ? Is there an alternative way to do this without a browser?

+4
source share
3 answers

Have you tried any of the following controls:

+3
source

I have used Lobo Browser with success previously. What you want to do is add the NavigationAdapter to your BrowserPanel and then check if the NavigationEvent parameter is set to

https://www.facebook.com/connect/login_success.html#access_token=USER_ACCESS_TOKEN 

for successful authorization.

For more information on the latter part, check the corresponding Facebook page .

+2
source

you can try javaFX2.0 if you use jdk1.7, it works on windows, linux and mac. you can insert the browser into the rotation panel and show / hide lines back / update / redirect / address.

http://docs.oracle.com/javafx/2/swing/SimpleSwingBrowser.java.htm

instead of creating your own path, I would suggest that you should use the OAuth API and see if the user login was successful or not. and if the application only stores user basic information that you can get with OAuth. In this case, you do not need to worry about working with the user password.

+2
source

Source: https://habr.com/ru/post/1435774/


All Articles