How to set iframe correctly in web page - html

Here I give an code. I want to set the iframe but is not showing anything. I don't understand what is the problem.
<iframe src="https://twitter.com/money2020"></iframe>

"Twitter's site blocks direct iframe display through the secure hypertext transfer protocol, which keeps someone from making a direct iframe to any given page on Twitter. Instead, Twitter widgets need to be created through the corresponding Twitter account to be embedded on a site within an iframe."
http://www.wikihow.com/Create-a-Twitter-Hashtag-Widget
https://twitter.com/settings/widgets

Related

How to load a specific section for a website embedded in iframe from an external href?

I've got a Wordpress website hosted with a page that contains an and within this iframe I have a few html pages like overview.html, diagram.html etc. In these html pages there are sections containing an ID that I can use to link to using #overview-chapter-1 (for example). However I do not want to do this linking from the containing parent, but from a different website hosted somewhere else.
What would I like to achieve?
I would like to open a specific section of the website that is embedded in the iframe from a different website than the parent containing this iframe.
So for example I have the following iframe which is hosted on
example.com. The overview.html contains a div named link-to-me.
How am I able to link to the overview.html#link-to-me from an that is not on the same website?
Please read this before answering the question:
This is not what I am looking for because this only applies to a link inside the same page. open link in iframe
Thanks for any help!

Crawl a website with iframe

I have a test project using a library supporting crawl(openbuilding spiderling).
The problem is when i crawl on url "https://examlple.com". This page content a iframe from "https://iframe.com".
I want to get the element p(s) inside the iframe. But i now only can get those elements by visit iframe.com. I want to know that is there anyway to get element p even when i don't visit iframe.com, such as wait for ifame loaded.
Thank you!
No, you cannot spider an iframe's contents from the parent page. The closest you can do is note the URL of the iframe and then go off and independently spider it.
Think of an iframe as a sandboxed and protective container that only lets you visually view its contents and nothing more - no spidering or talking to it (unless you own the page and are working with JavaScript Window.postMessage() etc.

Trying to iframe a website in html, won't display webpage

I'm new to coding, trying to get https://www.timeanddate.com/ to show up in an iframe with html. I'm not trying to do anything fancy, I just want the site to show up in the iframe. I have a few other sites that I already have working, just having an issue with this one.
I have done some searching, and found that I may not be able to display this site due to them denying embedding on other sites.
Just asking for some assistance with some code to get this to work, if possible.
Thanks in advance.
This is becaused https://timeanddate.com site has the X-Frame-Options header set to SAMEORIGIN.
What this means is that the page can only be iframed on a page the resides on the same domain.
As an example https://timeanddate.com/test could have an IFrame containing the main site on https://timeanddate.com, because they are both from the timeanddate.com domain.
Mozillas documentation for X-Frame-Options

Optimizing a Web Page to get it to embed well on Facebook, Embedly, et al

What code elements do I need to add/modify on a Web page to ensure that it gets embedded properly on a facebook status update?!
See below for an example of what I think is a good embed:
Some web pages I tried to embed don't appear very well on facebook i.e. when you put their links in a status update. Also, sometimes it gives you a selection of images to choose from?!
Is this purely a <meta> tag play, or are there other things I could do to ensure that the web page gets embedded the way I want it to (images and all)?!
Thanks.
Yes this is meta tags at work. You need to specify Open Graph metadata to define what appears on Facebook. See http://ogp.me/

how can I navigate to a new page without reloading part of the current page?

I have a mybb forum, and a plugin that adds a public/private chat to the bottom of the forum (it adds a div before </body>).
I would like to navigate the forum without reloading the chat.
In this question, Josh Stodola explains how to change the url.
In this question, there is a small JavaScript code to change the url.
I've also read about HTML5 iframes, but I still can't imagine how can I use it all together.
Should the chat be inside an iframe? an iframe inside the forum? should the forum be inside an iframe, and the chat into another? And those 2 iframes, inside a new page???
I'm messed up...
You should have a window containing chat and an iframe for your content. This will allow you to navigate your forum and only reload the iframe vs the top frame.
<body><iframe src="someurl"></iframe><div>Chat</div></body>
A few things to note: doing it this way will not change the address bar while you navigate and this makes users confused when they try to link to pages and it takes them to the home page or wherever they started browsing your forum.
If you want to do something more fancy checkout pjax. It will let you change urls for the whole page while only loading certain content.