trying to change twitter button style like facebook - css

I have included facebook like button in my website and i used i frame
and here is my facebook like button code
<iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Fplugins%2F&width&layout=box_count&action=like&show_faces=true&share=true&height=65" scrolling="no" frameborder="0" style="border:none;overflow:hidden;height:65px;" allowTransparency="true"></iframe>
This style is good its square and fix in my page in same maner i tried to apply twitter and google+ here i dont get the same style as facebook like
i need to apply same style like facebook
<iframe src="//platform.twitter.com/widgets/follow_button.html?screen_name=twitterapi"
style="width: 300px; height: 20px;"
allowtransparency="true"
frameborder="0"
scrolling="no">
</iframe>
<iframe src="https://plusone.google.com/_/+1/fastbutton?bsv&size=medium&hl=en-US&url=http://test.com/&parent=http://test.com/" allowtransparency="true" frameborder="0" scrolling="no" style="border:none;overflow:hidden;height:65px;" title="+1"></iframe>

Check this source : https://dev.twitter.com/web/overview/css (twitter)
And this one : https://developers.google.com/+/web/+1button/ (google +)
There are some examples and styles generators how to customize this plugins

Related

Google Embedded Map has a style property forced to it

I have page where all I need is a simple, full-width embedded google map. When I set the custom size of the map to 1980px x 240px, and put the iframe on my page, the width of the map is 1200px by default.
When I open Chrome DevTools window and find the iframe there, there is a style forced to the iframe, that is not in the original iframe I pasted from google maps.
The website is build on Wordpress. Link: https://zubar-litomerice.cz/
The original iframe:
<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d12061.22772549553!2d14.12158474671251!3d50.54234042444077!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x47097f6dc0e9276d%3A0xa7e584e5a1a520cc!2sHavlov%C3%A1+Hana+MUDr.!5e0!3m2!1sen!2scz!4v1533828352977" width="1980" height="240" frameborder="0" style="border:0" allowfullscreen></iframe>
Forced style:
<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d12061.22772549553!2d14.12158474671251!3d50.54234042444077!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x47097f6dc0e9276d%3A0xa7e584e5a1a520cc!2sHavlov%C3%A1+Hana+MUDr.!5e0!3m2!1sen!2scz!4v1533828352977" width="1980" height="240" frameborder="0" style="border: 0px; width: 1200px; height: 145px;" allowfullscreen=""></iframe>
I have searched for answers before asking and could not find anything, but maybe you can help me find the answer I am looking for.

YouTube Autoplay does not work with iFrame

My website has a player for multiple videos. I've been adapting the code to use YouTube's iframe API as the player. I can't get the videos to autoplay.
Here's the relevant code:
<body>
<iframe id="existing-iframe-example"
width="640" height="360"
src="https://www.youtube.com/embed/-SFcIUEvNOQ? autoplay=1&;enablejsapi=1"
frameborder="0"
autoplay="1"
style="border: solid 4px #37474F"
></iframe>
<div id="player"></div>
<div id="movieButtons" class="movieButtons">
<button class="movieButton" data-movieAdr="1-VjtC939_Q">Memorial Slide Show</button>
The rest is standard YouTube iframe API script. You can see I tried setting autoplay=1 as both an iframe parameter and as part of the iframe src. I've also tried including it in the data in the button. None of these seems to work. The vids load when the buttons are clicked, but they don't autoplay.
It's not working since April of 2018 because Google decided to give greater control of playback to users. You just need to add &mute=1 to your URL.
Autoplay Policy Changes
<iframe
id="existing-iframe-example"
width="640" height="360"
src="https://www.youtube.com/embed/-SFcIUEvNOQ?autoplay=1&mute=1&enablejsapi=1"
frameborder="0"
style="border: solid 4px #37474F"
></iframe>
Update :
Audio/Video Updates in Chrome 73
Google said :
Now that Progressive Web Apps (PWAs) are available on all desktop platforms, we are extending the rule that we had on mobile to desktop: autoplay with sound is now allowed for installed PWAs. Note that it only applies to pages in the scope of the web app manifest.
https://developers.google.com/web/updates/2019/02/chrome-73-media-updates#autoplay-pwa
mute=1 or muted=1 as suggested by #Fab will work. However, if you wish to enable autoplay with sound you should add allow="autoplay" to your embedded <iframe>.
<iframe type="text/html" src="https://www.youtube.com/embed/-ePDPGXkvlw?autoplay=1" frameborder="0" allow="autoplay"></iframe>
This is officially supported and documented in Google's Autoplay Policy Changes 2017 post
Iframe delegation A feature policy allows developers to selectively
enable and disable use of various browser features and APIs. Once an
origin has received autoplay permission, it can delegate that
permission to cross-origin iframes with a new feature policy for
autoplay. Note that autoplay is allowed by default on same-origin
iframes.
<!-- Autoplay is allowed. -->
<iframe src="https://cross-origin.com/myvideo.html" allow="autoplay">
<!-- Autoplay and Fullscreen are allowed. -->
<iframe src="https://cross-origin.com/myvideo.html" allow="autoplay; fullscreen">
When the feature policy for autoplay is disabled, calls to play()
without a user gesture will reject the promise with a NotAllowedError
DOMException. And the autoplay attribute will also be ignored.
This code allows you to autoplay iframe video
<iframe src="https://www.youtube.com/embed/2MpUj-Aua48?rel=0&modestbranding=1&autohide=1&mute=1&showinfo=0&controls=0&autoplay=1" width="560" height="315" frameborder="0" allowfullscreen></iframe>
Here Is working fiddle
<iframe src="https://www.youtube.com/embed/2MpUj-Aua48?rel=0&modestbranding=1&autohide=1&mute=1&showinfo=0&controls=0&autoplay=1" width="560" height="315" frameborder="0" allowfullscreen></iframe>
https://jsfiddle.net/YoJey_Thilipan/6naLm0yc/6/
it is working fine with me thanks.
You can use embed player with opacity over on a cover photo with a right positioned play icon. After this you can check the activeElement of your document.
Of course I know this is not an optimal solution, but works on mobile devices too.
<div style="position: relative;">
<img src="http://s3.amazonaws.com/content.newsok.com/newsok/images/mobile/play_button.png" style="position:absolute;top:0;left:0;opacity:1;" id="cover">
<iframe width="560" height="315" src="https://www.youtube.com/embed/2qhCjgMKoN4?controls=0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in- picture" allowfullscreen style="position: absolute;top:0;left:0;opacity:0;" id="player"></iframe>
</div>
<script>
setInterval(function(){
if(document.activeElement instanceof HTMLIFrameElement){
document.getElementById('cover').style.opacity=0;
document.getElementById('player').style.opacity=1;
}
} , 50);
</script>
Try it on codepen: https://codepen.io/sarkiroka/pen/OryxGP
For those who are attempting to use autoplay property on mobile view:
Autoplay function for mobile devices is a serious thing and it is disabled for most cases. The various reason includes data usage, spam advertisement, etc.

Facebook like box not showing news feed

Trying to add my bands like box to my website. I have done this for other websites and it has been fine but this page doesnt display any news feed or anything. I have heard that it wont show posts older than 30 days but I have much newer posts.
ANy help would be much appreciated.
page is www.facebook.com/Sidewaystheband
Existing code:
<iframe src="facebook.com/plugins/…; scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:400px; height:447px;" allowTransparency="true"></iframe>
Cheers
As I can see from your code that, the src attribute missed a closed double quote.
The code should be:
<iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2FSidewaystheband&width=292&height=590&show_faces=true&colorscheme=light&stream=true&border_color&header=true&appId=YOUR_APP_ID" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:590px;" allowTransparency="true"></iframe>
p.s. recommend to use HTML5 approach if possible

Make Facebook comment plugin in iframe scrollable

So I used this code rather than the XFBHL/HTML5 code
<iframe src="http://www.facebook.com/plugins/comments.phphref=http://9gag.com/gag/5852530&num_posts=2&action=comment&scrolling=yes&"
scrolling="yes" frameborder="0" style="border:none; overflow:hidden;
width:470px; height:400px;" allowTransparency="true"></iframe>
As you can see I already set scrolling to yes but still the comments are limited to its dimension.Another problem is how can I limit the number of posts? the num_post isn't seem to work in this code.

Google Maps - Wordpress Remove Speech Bubble

I am inserting the iFrame code from Googlemaps into a Wordpress Page.
What I would like to do is remove the address info bubble from the parameters, If possible?
My iFrame Code is :
<iframe width="610" height="180" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://www.google.co.uk/maps?f=q&source=s_q&hl=en&geocode=&q=York,+YO61+1EY,+UK&aq=0&sll=53.800651,-4.064941&sspn=19.563564,39.506836&vpsrc=6&ie=UTF8&hq=&hnear=York+YO61+1EY,+United+Kingdom&t=m&ll=54.072182,-1.088762&spn=0.017627,0.036478&z=14&iwloc=A&output=embed"></iframe>
Any help on this one appreciated.
All you need to do is add this into your iframe code
&iwloc=near
So replace your code with this
<iframe width="610" height="180" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://www.google.co.uk/maps?f=q&source=s_q&hl=en&geocode=&q=York,+YO61+1EY,+UK&aq=0&sll=53.800651,-4.064941&sspn=19.563564,39.506836&vpsrc=6&ie=UTF8&hq=&hnear=York+YO61+1EY,+United+Kingdom&t=m&ll=54.072182,-1.088762&spn=0.017627,0.036478&z=14&iwloc=A&output=embed&iwloc=near"></iframe>
An even easier way than the above answer: just remove the capital A at the end of the iwloc code so it reads: iwloc=&

Resources