On 16 December 2010 16:35, Guo Y. [email protected] wrote:
hello
the non rails url is
https://graph.facebook.com/oauth/authorize?client_id=...&redirect_uri=http://www.example.com/oauth_redirect
how do i use redirect_to method in my rails app to redirect to the url
above? i am confused how to append params.All of the following three
ways don’t work.
Just pass the complete url in as a string.
Colin
Colin L. wrote in post #968890:
On 16 December 2010 16:35, Guo Y. [email protected] wrote:
hello
the non rails url is
https://graph.facebook.com/oauth/authorize?client_id=...&redirect_uri=http://www.example.com/oauth_redirect
how do i use redirect_to method in my rails app to redirect to the url
above? i am confused how to append params.All of the following three
ways don’t work.
Just pass the complete url in as a string.
Colin
But using the complete url, this
url–https://graph.facebook.com/oauth/authorize?client_id=...&redirect_uri=http://www.example.com/oauth_redirect--
is not triggered directly by browser,which just displays an link.when i
click that link, the above url is triggered, which is not the expected
behavior.Maybe it is becuse the new facebook authen.
colin,is there any other way to redirect_to non rails url containing
params?
Colin L. wrote in post #969042:
On 17 December 2010 10:47, Guo Y. [email protected] wrote:
above? i am confused how to append params.All of the following three
behavior.Maybe it is becuse the new facebook authen.
Sorry I have not the foggiest idea what you are talking about. Are
you saying redirect_to is not generating the html you expect?
Perhaps you should show exactly the code you have used, and the html
generated, and explain what is wrong with it.
Colin
colin
I am developing an app for facebook.Facebook need to authorize the user
using the fllowing authorize url whose response should be a popup
iframe.
#sorry,i can not post my client_id.this url with params is offered by
facebook,and i should replace the client_id and redirect_uri with myown.
authorize_url=“https://graph.facebook.com/oauth/authorize?client_id=...&redirect_ur=http://custom-survey.heroku.com/users/normal_auth_result”
#when user is not authorized,redirect to authorize_url to authorize user
#in my rails app.
redirect_to(authorize_url)
so when redirect_to(authorize_url) runs,a popup(2.png) should appear,but
i get an image with bottom link(1.png). what’s more,when i click the
1.png,the 2.png appears.I mean i should get the 2.png directly,not the
indirect one like above.I am sure i am doing to the fb doc,and the
authorize_url is made as fb doc says.
I think maybe it is because i am using the new beta authorizing
mechanism which is still in development.or maybe rails method
redirect_to has special grammar when it comes to non rails url with
params.
On 17 December 2010 13:26, Guo Y. [email protected] wrote:
#when user is not authorized,redirect to authorize_url to authorize user
mechanism which is still in development.or maybe rails method
redirect_to has special grammar when it comes to non rails url with
params.
What happens if you put the url directly into the browser window?
What does the rails log show when it runs the redirect?
Colin
On 17 December 2010 10:47, Guo Y. [email protected] wrote:
above? i am confused how to append params.All of the following three
behavior.Maybe it is becuse the new facebook authen.
Sorry I have not the foggiest idea what you are talking about. Are
you saying redirect_to is not generating the html you expect?
Perhaps you should show exactly the code you have used, and the html
generated, and explain what is wrong with it.
Colin
Colin L. wrote in post #969060:
On 17 December 2010 13:26, Guo Y. [email protected] wrote:
#when user is not authorized,redirect to authorize_url to authorize user
mechanism which is still in development.or maybe rails method
redirect_to has special grammar when it comes to non rails url with
params.
What happens if you put the url directly into the browser window?
when put it in browser directly,the response works well like fb doc
says,popuping an iframe.
What does the rails log show when it runs the redirect?
i have attached the server log images.As it shows,when ‘signed_request’ param
implys the user is not authorized in the home/index method,he will be redirected
to fb url(whose response should be popup window)
“https://graph.facebook.com/oauth/authorize?client_id=...&redirect_uri=http://custom-survey.heroku.com/users/normal_auth_result”.But
i still need to click 1.png to get popup window.
Colin
On 17 December 2010 15:03, Guo Y. [email protected] wrote:
What does the rails log show when it runs the redirect?
i have attached the server log images.As it shows,when ‘signed_request’ param
implys the user is not authorized in the home/index method,he will be redirected
to fb url(whose response should be popup window)
“https://graph.facebook.com/oauth/authorize?client_id=...&redirect_uri=http://custom-survey.heroku.com/users/normal_auth_result”.But
i still need to click 1.png to get popup window.
So you are saying that if you enter the url directly in the browser
you get one result, but if you use rails to redirect to exactly the
same url then you get a different effect?
What happens if you just put a link to that url on your web page and
click it?
Colin
Guo Y. wrote in post #969080:
So you are saying that if you enter the url directly in the browser
you get one result, but if you use rails to redirect to exactly the
same url then you get a different effect?
yes,that is right.
Perhaps there is an authentication issue, either involving a cookie or
HTTP-Basic authentication. In that case, you need to get the
authentication happening.
What happens if you just put a link to that url on your web page and
click it?
i appreciate this debug way.i have made a link and click it on my
page,the result is right,a popup window appears. i think i don’t need to
attach an image to show it.Colin,it seems redirect_to method doesn’t
work well with facebook url.
Best,
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
Marnen Laibow-Koser wrote in post #969084:
Perhaps there is an authentication issue, either involving a cookie or
HTTP-Basic authentication. In that case, you need to get the
authentication happening.
but how?