0
votes

After authentication facebook app redirecting my inner page to HTTP despite it is https://apps.facebook.com/myappname

i provide redirect_uri to http://mysite.com/welcome.aspx

https://www.facebook.com/dialog/oauth?client_id=XXX&redirect_uri=http://mysite.com/welcome.aspx&scope=user_hometown,user_location,email,user_birthday,status_update,publish_stream,read_stream,user_about_me,offline_access,user_likes,read_mailbox,user_online_presence,read_requests&response_type=code

how can i manage it to if http then http else https???

1
Why not set the redirect_URI to the HTTPS version for users accessing the site over HTTPS? - Igy
then it will redirect to HTTPS. Facebook using http or https based on user security setting. it is not fixed. - samirprogrammer
let me rephrase: why not detect yourself if the iframe from Facebook is loaded over HTTPS and if so, redirect to the HTTPS version. I'm not sure how to do this in ASP but in PHP you can do something like if( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ) { - Igy
this is what i need but in asp.net it is returning for our website not facebook application... - samirprogrammer

1 Answers

1
votes

Starting from 1. October 2011. Facebook forced usage of HTTPs protocol for communication with 3th party applications. I would recommend using HTTPs even if it's possible usage of HTTP, this method will ensure no Security Exceptions or warnings will be show users access your application... so redirect URI should be https://mysite.com/welcome.aspx, of course server would need to support protocol, and have certificate, at least self-signed for testing.