Lets say my Facebook app url is http://fb.domain.com/
and the app url is http://apps.facebook.com/demoapp/
Now I want a user cannot open the application url directly and must in iframe on Facebook.
How do I detect & redirect link to http://apps.facebook.com/demoapp/
if user open the link directly?
Let me know the key.
If you are just trying to detect whether a user has opened your URL inside of an iframe, with javascript enabled you could do:
if (window!=window.top) { /* I'm in a frame! */ }
Hope that answers your question.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With