Load embedded Facebook post inside iframe in local html file - html

I'm trying to load facebook posts inside a local html file by html code provided via Facebook post's 3 dot menu "..." -> Embed button.
It looks something like this.
<iframe src="https://web.facebook.com/plugins/post.php?href=https%3A%2F%2Fweb.facebook.com%2F20531316728%2Fposts%2F10154009990506729%2F&width=500" width="500" height="313" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe>
When it's on server it works properly, but when loaded from a local html file, I'm getting "This Facebook post cannot be loaded." message.
I need to load it locally. Any ideas?

Related

Spotify Embed code (iframe) won't work in Markdown

Using React-Markdown on Next.JS, the post pages are stored as Markdown files, but for some reason the Markdown file won't render the iFrame. However if I use a standard Markdown Editor such as the one I created markdown-edit.now.sh the embed code works perfectly fine.
Any reason as to why it wouldn't be loading on my pages but is fine in
Embed Code
<iframe src="https://open.spotify.com/embed/album/0BRICN5TGMT1WqFcZkYOaF" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>
Try this:
<ReactMarkdown escapeHtml={false} source={blog.content} />
ReactMarkdown handles iframes as "dangerous html". To disable this just do:
<ReactMarkdown allowDangerousHtml={true}>Your content here<ReactMarkdown/>

Make changes to a website written in HTML based on the content on a text file

So I've been looking around for an answer to this, without success.
So I'm looking to have the text inside of a .txt file to be inserted in a line in html5 code, I can't think of how this should be worded so here's an example.
<iframe type="text/html" frameborder="0" width="1920" height="1080" src="https://www.youtube.com/embed/TEXTFILECONTENT" allowfullscreen></iframe>
And is it possible to have it change every time the content of the text file changes?
Any questions please reply I'm sure I wrote this somewhat wrong.
Yes u can!, u must create your HTML5 with Ajax. example:
Client open ur HTML5 page
Client get fresh text
every 3 sec. ajax synchronize your text file from server or other
this can solve your problem because if u change text then each 3 sec. client get uptodate text..
just change src to your file.., replace 'TEXTFILECONTENT' with the file name YOUR.txt
Your IFrame's src should simply be set to the full url to the text file. In your example, replace 'TEXTFILECONTENT' with the file name, like 'MyTextFile.txt'. Then the browser should fetch the file and display it in the iframe. If your textfile is in a subdirectory, then add that to the url, like 'folder/textfile.txt'.
Edit:
You can add a link to your page that loads the textfile into the iframe. First give your iframe an id, like this:
<iframe id="myiframe" type="text/html" frameborder="0" width="1920" height="1080" src="https://www.youtube.com/embed/TEXTFILECONTENT" allowfullscreen></iframe>
Then give your link a target attribute, like this:
Discord server
Now when people click the link the textfile will be loaded into the iframe.

SharePoint Showing a mht file securly

On my sharepoint I can display my excel file in mht file. but when I get to display the aspx page it keeps asking me if I want to display all content.
I know I just need to change the way the sharepoint goes to the source but if I do change it, the file just try's to download. I do not want that. I wanted to display a directory page that has a few mht files. and while I can display it, it keeps displaying a warning saying its only displaying secure content. How should I go about this, I know it needs to be https but how do I go about this ???
<p>
<strong>
<iframe align="middle" src="\\sharepoint.company.com\sites\Display\SitePages\HTML\Type\fileA.mht" width="100%" height="150%" scrolling="no" ></iframe>
</strong>
</p>
What I had to do was post it as a iframe with a separate page. that got rid of the security problem.
<strong>
<iframe align="middle" src="\\sharepoint.company.com\sites\Display\SitePages\HTML\Type\fileA.aspx" width="100%" height="400px" frameBorder="0"></iframe>

Videos in facebook embed feed is not displaying in Chrome App

EDIT : Actually the issue is this one : Native Videos in embed feed are not supported if user is not logged in. (And so in a webview chrome app, it is not logged in) Bug reported to Facebook here : https://developers.facebook.com/bugs/353742028342246/ and maybe it is "by design"
Old question :
I want to show a Facebook page feed in a Chrome App, it works very well except native videos are not visible.
To reproduce, take the hello world app: https://github.com/GoogleChrome/chrome-app-samples/tree/master/samples/hello-world
Add permissions:["webview"] in manifest.json
Add this after <h1>Hello, World!</h1> :
<webview src="https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2Fyoutube%2F&tabs=timeline&width=340&height=500&small_header=false&adapt_container_width=true&hide_cover=false&show_facepile=true" width="340" height="500" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></webview>
(use this page : https://developers.facebook.com/docs/plugins/page-plugin and replace 'iframe' with 'webview')
Chrome -> Load Unpacked Extension -> You will see the feed but without the native videos :
If you open index.html with your browser (and use <iframe>) it will show the video...
If I use <webview src="https://www.mydomain.fr/company">, with the correct <iframe> in it, same problem : works except native video.
PS : Youtube Videos are working, you can try with the Youtube page:
<webview src="https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2Fyoutube%2F&tabs=timeline&width=340&height=500&small_header=false&adapt_container_width=true&hide_cover=false&show_facepile=true" width="340" height="500" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></webview>
I reported the bug to Facebook and maybe it is "by design"
https://developers.facebook.com/bugs/353742028342246/
waiting for a response by the "team" though.
First copy the URL of the facebook video you want.
Then go on this page:
https://developers.facebook.com/docs/plugins/embedded-video-player#configurator
Paste the URL where it says "URL of the video", then click Get Code which is located at the bottom.
You can copy the url that is placed in href tags (which is on step 3) and paste it into your editor.

Why .doc automaticly downloads, but not shown in <iframe>?

The problem is - when I input url with .png or .pdf it has been shown in iframe>. I can scroll it, read etc.
But when I insert an url which has docx or xls file (ex. "http://www.exampleimage.docx") - it automatikly aploads by browser, and not shown in iframe>.But i want to see content of .docx file in iframe like i do with pdf.
What to do or where to search guys?
here is part of my code:
<iframe src={{attachmentUrl}} width="468" height="468" frameborder="0">
Click on attachment please.
</iframe>
You can edit your url i.e,
"https://docs.google.com/gview?url=${YOUR_URL}&embedded=true" and then add to iframe:
<iframe
className="doc"
src={`https://docs.google.com/gview?url=${YOUR_URL}&embedded=true`}
/>