Mehmet Fatih Yıldız
Mehmet Fatih Yıldız

Reputation: 1827

facebook oauth authentication doesn't return "code" parameter

I'm trying to use facebook's oauth. Basically facebook has to return me a "code" parameter. But i get nothing, it just return my callback url (to the exact same url).

i'm generating this url with my app.

http://www.facebook.com/dialog/oauth?client_id=76209388873&redirect_uri=http%3A%2F%2Ffb.lous%2Fmain%2Ffacebook_callback&scope=read_stream

I used other parameters and options, just when i set response_type=token i get parameter list for javascript (with # character instead of ?, its for client side, i'm trying to write some api bot)

So right now i can't get any parameter with someway.

Upvotes: 2

Views: 1783

Answers (1)

daniel.auener
daniel.auener

Reputation: 1294

I tried to solve exactly the same thing for several hours. In my case it turned out to be a stupid redirect problem. Facebook correctly redirected back to http://www.mysite.com with the code parameter, then my webapp redirected to http://www.mysite.com/users/login (because the user wasn't logged in yet). On the second redirect I lost the code parameter.

Upvotes: 1

Related Questions