2

After my request for the access_token i see it on a blank html page, on FB url and not on my address. Exactly like in FB doc: http://developers.facebook.com/attachment/auth_token.png

I want it to redirect to my url so i can do the check: if (request.getParameter("access_token") != null and get access_token this way, but it doesn't happen. (&redirect_uri= is correct in my requests - it did redirect back when asken for code=)

N.N.
  • 8,336
  • 12
  • 54
  • 94
Talik
  • 103
  • 1
  • 5
  • I dont think you can do that, the auth token is not passed in the url. if you want it to be passed in the url, you'll have to go for the client side authentication flow. As mentioned in the docs for authentication. Btw, are you using some facebook-java api or doing all the calls yourself without a library? – bool.dev Dec 03 '11 at 07:02
  • hi, i want the access_token to be passed as a parameter (not by client) and catch it with getParameter("access_token") (or another java method). The point is that the browser stops on https://graph.facebook.com/oath/.... (exactly as seen at the photo) and not redirected back to my page so i don't see the result of getParameter("access_token"). – Talik Dec 03 '11 at 11:42
  • 1
    About the library, I'm planning to use restFB api, but i have to do the authentication calls by myself (I think restFB is usefull only after you get the access_token). Can you recommend on another library that also deals with the authentication issue? – Talik Dec 03 '11 at 11:49
  • 1
    Can you show part of your code? The parts where you are calling the graph for the access token, and then displaying the token in the browser. As for library, i don't know of any java library, but i'm sure you'll find many through a quick search. In my opinion, you can build up your own library, but it might take time. You can edit your question and add some code. – bool.dev Dec 05 '11 at 06:48

1 Answers1

0

It seems I can't comment. Maybe an admin can convert this into a comment?

Just wanted to say that the scribe project makes it very easy to obtain an access token. More here: https://github.com/fernandezpablo85/scribe-java

stackmagic
  • 164
  • 8