-1

Is it possible to make a Facebook desktop application in Java without using a servlet?

I am developing a Facebook desktop application. I am very close to completion, but a problem comes in getting an access token.

I successfully opened a browser through my Java code, but I can't read the URL of the web browser. I don't want to use a servlet.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
  • yes it' possible.follow this example all user need to verify themself and need to enter authorization code in your application.https://github.com/fernandezpablo85/scribe-java/blob/master/src/test/java/org/scribe/examples/FacebookExample.java – Umesh Awasthi Feb 26 '12 at 14:19
  • 2
    Please ask your questions politely: "just answer in yes or no" - no need for that nonsense. – YXD Feb 26 '12 at 14:30
  • 2
    Of course. An API is an API. I'm updating your title to be actually useful. – Dave Newton Feb 26 '12 at 14:41
  • @DaveNewton My reading of the OP's question he is not using the API but controlling a browser using Java. –  Feb 26 '12 at 14:47
  • @leftbrain Oh. That's even weirder then. – Dave Newton Feb 26 '12 at 14:48
  • @Umesh Awasthi Thanx buddy ur post reaaly helps me. It just pull me out of a dark path. – Prashant Yadav Feb 27 '12 at 10:16
  • @leftbrain. sorry for ur reading. But actually i dont want to do anything like controolling browser with java. Net is full of such codes. – Prashant Yadav Feb 27 '12 at 10:18
  • @dave Newton. Thanx for updating my title. Yeah u r right an api is api.I can get access token for FB by providing some redirect url. but i dnt want to make a web app. I just want to make a simple java app. Now Scribe is the soln for this. – Prashant Yadav Feb 27 '12 at 11:03

1 Answers1

2

Yes it is possible to do that, check out the Authentication documentation, the part you are most interested in is titled Desktop Apps, and it says:

Our OAuth 2.0 implementation does not include explicit desktop app support. However, if your desktop app can embed a web browser (most desktop frameworks such as .NET, AIR and Cocoa support embedding browsers), you can use the client-side flow with one modification: a specific redirect_uri.

You can read more and see exactly how there.

Nitzan Tomer
  • 155,636
  • 47
  • 315
  • 299