How to embed facebook post in shiny r? - r

I'm trying to use the facebook SKD to embed a post in my Shiny app. I have the iframe of a public post.
<iframe src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fladygaga%2Fposts%2F10157645664974574&width=500" width="500" height="594" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true" allow="encrypted-media"></iframe>
Currently I'm using the shiny HTML() function and I managed to see the fb_iframe_widget in the developer console. But the post is not showing.
This is what my current approach looks like:
ui <- fluidPage(
HTML('<div id="fb-root"></div>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.3"></script>')
HTML('<iframe src="https://www.facebook.com/plugins/post.php? href=https%3A%2F%2Fwww.facebook.com%2Fladygaga%2Fposts%2F10157645664974574&width=500" width="500" height="594" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true" allow="encrypted-media"></iframe>')
))
I also tried doing what they do here: embed iframe inside shiny app
It didn't work. I get the iframe but not the post.

Your codes work perfectly fine. But you need to open the app in a separate browser. Iframe doesn't work in Rstudio Viewer Pane.

Related

embed html into iframe in an vue3 vite

I an writing an vue3 web app using vite. I am using an dev framework call vue-vben-admin.
I try to embed an local html into iframe, but the iframe page keep showing the homepage
I put "test.html" in public/static/test.html
so my iframe page would be
<iframe id="f1" ref="frame1" :src="'static/test.html'"></iframe>
<iframe id="f2" ref="frame2" :src="'/static/test.html'"></iframe>
either ways it just won't work as expected.
The actual iframe url is "https://localhost:3100/static/test.html"
It seems that won't be an 404 problem because when I use Image, the following code work fine:
<Image src="/resource/img/logo.png" />
For me it just worked when I added the html file to the public folder, but then I had to omit the '/static', so I used
<iframe id="f1" ref="frame1" :src="'/test.html'"></iframe>

Youtube iframe fullscreen

hope everyone is ok.
I need to build a page in our company's website where we're putting some videos of our production.
The problem is, i can't seem to find a way to make the videos available in fullscreen mode for the visitors.
I've done pratically every solution that i've found, but none seems to work. I've done:
<iframe allow="fullscreen;">
---
<iframe src="your_page_url"
allowfullscreen="allowfullscreen"
mozallowfullscreen="mozallowfullscreen"
msallowfullscreen="msallowfullscreen"
oallowfullscreen="oallowfullscreen"
webkitallowfullscreen="webkitallowfullscreen">
</iframe>
---
allowFullScreen="allowFullScreen" and frameBorder="0"
---
<iframe
id="player"
src="URL here"
allowfullscreen="true">
</iframe>
---
But none of that worked.. Any help here is welcome!
its very easy if you wants to add youtube videos in iframe .you just have to add iframe in src embed word like that
<iframe src="https://www.youtube.com/embed/watch?v=fbS2O4VETAo&t=2s" name="myFrame"></iframe>
after youtube.com/embed/Example url

Adding the YouTube iframe to a Cordova app on iOS

I'm using Cordova 3.0 and am trying to embed a YouTube video inside an article of my news app. The YouTube code looks like this:
<iframe width="600" height="450" src="//www.youtube.com/embed/_OBlgSz8sSM" frameborder="0" allowfullscreen></iframe>
In its current form the code does nothing except leave a large wide white square in the DOM. When I inject the letters http: so that it looks like this:
<iframe width="600" height="450" src="http://www.youtube.com/embed/_OBlgSz8sSM" frameborder="0" allowfullscreen></iframe>
then the app automatically quits and goes to the browser. How can I just make the iframe behave as it should, as a little window. I have followed the steps mentioned in this question and have tried fiddling with the <preference name="stay-in-webview" value="false" /> line in the config.xml file.
Is this what you are looking for
Force HTML5 youtube video
<iframe src="http://www.youtube.com/embed/_OBlgSz8sSM?html5=1"></iframe>
OR may be
Show Youtube video source into HTML5 video tag?
Step 1: add &html5=True to your favorite youtube url
Step 2: Find tag in source
Step 3: Add controls="controls" to video tag:
<video controls="controls"
class="video-stream"
x-webkit-airplay="allow"
data-youtube-id="N9oxmRT2YWw"
src="http://v20.lscache8.c.youtube.com/videoplayback?sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Cratebypass%2Coc%3AU0hPRVRMVV9FSkNOOV9MRllD&itag=43&ipbits=0&signature=D2BCBE2F115E68C5FF97673F1D797F3C3E3BFB99.59252109C7D2B995A8D51A461FF9A6264879948E&sver=3&ratebypass=yes&expire=1300417200&key=yt1&ip=0.0.0.0&id=37da319914f6616c"></video>
More SF posts:
YouTube video in HTML5
Force HTML5 youtube video

Is not possible to toggle fullscreen in iframe for flash video?

I'm using embed code to do live stream and the embed code like youtube one works perfectly
but some of them I have to use code such as iframe the fullscreen feature doesn't work.
<iframe src="linkhere" width="600" height="450"/>
and I can not toggle the video into fullscreen
will it be any possible way to make it fullscreen if they click on the option?
or will it be any other embed code that similar to iframe to use?
Your problem could be that the flash plugin recognises iframe as your "fullscreen"..
When looking at the youtube embed code, i recognised a function "allowfullscreen" within the iframe definition
make sure you also have this part in your code..
<iframe width="560" height="315" src="http://www.youtube.com/embed/NWHfY_lvKIQ" frameborder="0" **allowfullscreen**></iframe>
else there might be another option beside an iframe..

How can I play a URL in an iframe?

I want to play a URL in an iframe. When I place any other URL in the following line, it works fine, but when I enter the YouTube URL I get a blank page. Can anyone tell me where I am going wrong, or suggest any other method by which I can play the YouTube URL in an iframe?
<iframe width="100%"
height="610px"
frameborder=0
marginwidth="0"
marginheight="0"
scrolling="yes"
name="frmTest"
src="http://www.youtube.com/watch?v=dG5irzonTXA">
</iframe>
Your code will open a normal YouTube page. If I'm correct you want to have an iframe with video in it.
Try this: https://developers.google.com/youtube/youtube_player_demo
There's lot's of documentation there too.

Resources