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=)

4
  • 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? Commented Dec 3, 2011 at 7: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 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"). Commented Dec 3, 2011 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? Commented Dec 3, 2011 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. Commented Dec 5, 2011 at 6:48

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.