I had to embed an external web page using an iframe, I found no issue and it is working fine for me.
<iframe src="<?php echo $uri; ?>" width="100%" height="100%" frameborder="0"></iframe>
However a user have informed that in iphones, the "src" url in iframe loads in browser (parent window without iframe) when accessed via iphone.
Can anyone please suggest a suitable solution. The target url is from an external domain .
Best Regards
Indunil
Related
I've looked at the Facebook page plugin to embed pages or tabs found here: https://developers.facebook.com/docs/plugins/page-plugin/
There they show how to embed pages and tabs. Eg:
<iframe
src="https://www.facebook.com/plugins/page.php?https://www.facebook.com/myfacebookpage/&tabs=timeline"
frameborder="0"
scrolling="no"
allowfullscreen="true"
height="1000px"
width="100%">
</iframe>
They list some of the tabs that can be rendered such as timeline, events, messages. However, it does not work for the tab called live_videos.
Is there ANY way I could embed https://www.facebook.com/myfacebookpage/live_videos/ without creating a facebook app?
I've finally found a workaround. The reason for my original question was that I only want to embed live stream and previous live stream videos.
Facebook has an option to make the live url static:
When this is done, the facebook tab parameter 'live' can be used:
<iframe
src="https://www.facebook.com/plugins/video.php?href=https://www.facebook.com/YourFBPageName/live"
frameborder="0"
scrolling="no"
allowfullscreen="true"
height="1000px"
width="100%">
</iframe>
Flarum is a new-age forum software and it has a brilliant mobile web app that works incredibly well on iOS/Android's chrome. It has lots of functionality such as swiping discussions, tapping on replies etc etc.
My goal is to load that same mobile web app from an Ionic hybrid app. The first thing I tried loading the mobile web app from an iFrame. This caused a lot of problems. Initially the page wouldn't even scroll, only after a couple session of serious google-fu was I able to get the scrolling to work, that too it was very choppy.
Then I started looking at ngCordova's InAppBrowser. The problem is I can't seem to get the same functionality as loading it from Chrome within iOS/Android. Scrolling works fine, but the other functionality is missing ie swiping of discussion and many other things.
Is this a limitation within Ionic/ngCordova, or is there something that I should look at ? I've looked at the documentation and followed the steps from here
Any tips, pointers, or sample apps would be greatly appreciated. Thanks !
tl;dr: I want to load a mobile website from Ionic ngCordova's InAppBrowser, but can get the same functionality as loading it from chrome/safari on a mobile device.
JS
window.open(‘http://example.com’, ‘_system’); //Loads in the system browser
window.open(‘http://example.com’, ‘_blank’); //Loads in the InAppBrowser
window.open(‘http://example.com’, ‘_blank’, ‘location=no’); //Loads in the InAppBrowser with no location bar
window.open(‘http://example.com’, ‘_self’); //Loads in the Cordova web view
HTML
<ion-view title="Test Page">
<ion-content>
<div class="list">
<a class="item" href="#" onclick="window.open('http://www.nraboy.com/contact', '_system', 'location=yes'); return false;">
Open a Browser
</a>
<a class="item" href="#" onclick="window.open('http://www.twitter.com/nraboy', '_system', 'location=yes'); return false;">
Open a Twitter Client or Browser
</a>
<a class="item" href="#" onclick="window.open('https://plus.google.com/+NicRaboy', '_system', 'location=yes'); return false;">
Open a Google+ Client or Browser
</a>
</div>
</ion-content>
</ion-view>
Source https://www.thepolyglotdeveloper.com/2014/07/launch-external-urls-ionicframework/
Have this problem, I have a WordPress website and on the single.php file when articles are we have a scrolling social bar, with Facebook like, Tweeter and Google+
However I wanted to change the Facebook like into a Facebook share button.
Anyone have the answer to this, I've been searching for ages to find a solution.
The Facebook like code I have is:
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&layout=button_count&show_faces=false&width=100&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:20px;">
</iframe>
I have tried using: <div class="fb-share-button" data-href="<?php the_permalink() ?>" data-type="box_count"></div>.
This doesn't display all the time in Firefox and is virtually non-existent in Chrome, Safari and IE.
I use Facebook comments, so when share button doesn't appear, nor does the comments section.
I'm at my witts end with it.
Many thanks in advance
Try removing data-href="perma-link stuff" that Facebook automatically puts in for you.
Ok guys. I am not a WordPress or much of a PHP man. I know I need to be but I wasn't raised that way. I ran into a problem lately. Our Facebook like button won't show up. I don't know why. We are using jetpack version 2.3.1 and the tweet and Google plus button work fine. I can see that the Facebook iFrame button is there but it is empty. I inspect it with chrome and find that the URL for that, when I open it in a new window, shows me nothing. Any ideas? I've tried installing the 'Facebook Like Button' plug in but that didn't show up and I can't seem to find a good source. I've been searching around for a few days now.
Here is the URL from one of the posts that is in the Facebook iFrame button https://www.facebook.com/plugins/like.php?api_key=&locale=en_US&sdk=joe%E2%80%A6ton_count&colorscheme=light&show_faces=false&extended_social_context=false
Here is the site I'm working on: Site
I believe the problem lies with this code here:
<div class="like_btn">
<fb:like href="<?php echo urlencode(get_permalink($post->ID)); ?>" layout="button_count" show_faces="false" width="100" font=""></fb:like>
</div>
Had the same problem and apparently it needs to be within an iframe.
Try this code:
<div class="like_btn"><iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&layout=button_count&show_faces=false&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:30px"></iframe>
</div>
An associate of mine maintains a facebook page for the company we work for.
The company wants a widget to put on their facebook to allow users to enter their email and subscribe to our newsletter.
The associate who does facebook is not a programer so he asked me to build something.
I made a small page that uses jquery and ajax to allow you to enter your email address and it sends it to our server using ajax so you never leave the page you are on.
We want to embed this page on facebook using an iframe.
First we just tried entering the iframe, which did not work,
then we found a tutorial and tried to embed the iframe the way it says like this:
<a onClick="outside_location.setInnerFBML(link_1);" style="cursor: pointer;">Let's see that iframe....</a>
<div id="outside_location"></div>
<fb:js-string var="link_1">
<fb:iframe height="500" allowTransparency="true" frameborder="0" scrolling="no" style="width:100%; border:none" src="http://URL-TO-OUTSIDE-LOCATION"></fb:iframe>
</fb:js-string>
<script type="text/javascript" charset="utf-8">
var outside_location = document.getElementById('outside_location');
</script>
It seems like facebook is appending things to our variables so link_1 becomes something like a325461252_link_1
Then we get a JS error like this:
Uncaught reference error:
a325461252_link_1 not defined
But every once in a while it will work but 99% of the time we get this error.
I have never built anything for facebook before, I am not sure there is is some sort of facebook way of doing things.
Is there something I am doing wrong? I have done many google searches trying to find answers and everything I find varies from "facebook does not allow iframes" to "facebook recommends iframes" so I really don't know what to think.
Check to see that your application is setup as an FBML applicaiton and not an Iframe application. An iframe application will not expand fb:... tags by default. Also inspect the DOM (Chrome or Firebug) to see if the Dom is getting changed when you click the link, but the iframe just isn't visible.
I just tested the following and it worked:
<hr/>
<a onClick="outside_location.setInnerFBML(location_two);" style="cursor: pointer;">Other IFrame Location</a>
<div id="outside_location" width="540" height="270" >
<fb:iframe width="540" height="270" frameborder="1" src="http://www.yahoo.com" />
</div>
<fb:js-string var="location_two">
<fb:iframe width="540" height="270" frameborder='1' src='http://www.google.com' />
</fb:js-string>
<script type="text/javascript" charset="utf-8">
var outside_location = document.getElementById('outside_location');
</script>
If all you wanted to do is add an iFrame to your application canvas then you can simply use this line:
<fb:iframe width="720" height="570" frameborder="1" src="http://www.yahoo.com" />
Or just change your application from an FBML canvas application to an iFrame application and point your Canvas Callback and Connect URL to your current page or page's directory. If you aren't using Facebook's API or FBML elements then you may not need to be in an FBML application at all.
BTW: To programmatically add iframes in Facebook you can use JavaScript like so:
<script type="text/javascript">
var Iframe = document.createElement('iframe');
Iframe.setStyle('smartsize','true');
Iframe.setStyle('frameborder','yes');
Iframe.setStyle('scrolling','no');
Iframe.setStyle('include_fb_sig','true');
Iframe.setStyle('width','500px');
Iframe.setStyle('height','500px');
Iframe.setSrc("http://www.msn.com");
document.getRootElement().appendChild(Iframe);
</script>
Good Luck!