Now in September 2020 a new change from Facebook. The button height is always 28px for small or large button.
To align the buttons:
Step 1: Place both buttons inside a div
<div class="socialMedia">
<div id="fb-root"></div>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v8.0" nonce="1lGOwZCs"></script>
<div class="fb-like" style="padding-right:4px" data-href=...></div>
<a href="https://twitter.com/share?ref_src=twsrc%5Etfw" class="twitter-share-button" data-url=...>Tweet</a><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
</div>
Step 2a: Set the line-height of the div as 11px
or
Step 2b: Set font-size as 1px
.socialMedia {
float: right;
width: 250px;
display: block;
padding-top: 25px;
text-align: right;
line-height: 11px
}
or
<div class="fb-like" style="font-size:1px;display:inline-block;"...</div>
Step 3: Set height as 20px
The generated span inside the Facebook div is force to have the same height as Twitter iframe of 20px:
div.fb_iframe_widget > span {
height: 20px !important
}
The above values are for the small button. For the large buttons, the values must be changed properly.