I can't browse Facebook on the webview.

Asked 2 years ago, Updated 2 years ago, 82 views

As the title suggests, I cannot browse Facebook on the webview.
I'm doing it in the following way, but it doesn't work.
It works well on other pages, but can't Facebook do webview?
The verification device is ipod, ipad.
If you know anything about it, please let me know.

URLs that can be displayed
<iframe src="//f-tpl.com/sample/tpl_081/" frameborder="0" scrolling="yes" width="100%" height="100%">/iframe>

<hr of >

Unavailable URL (Facebook)
<iframe src="https://www.facebook.com/" frameborder="0" scrolling="yes" width="100%" height="100%"></iframe>

html monaca webview

2022-09-30 20:32

1 Answers

In conclusion, https://www.facebook.com/ cannot be displayed in iframe because Facebook does not allow it to be displayed in iframe

.

If you clear the browser developer tool Console and click RRuncode snippet in the question, you will see the following error:

Refused to display 'https://www.facebook.com/' in a frame cause it set 'X-Frame-Options' to 'DENY'.

This means that the X-Frame-Options in the response header is set to DENY, and the page cannot be displayed in iframe.


2022-09-30 20:32

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.