I'm working on Ruby On Rails, and just integrated Facebook Send button in a project. When Clicked on the "Send" button, the popup window is going out of the screen and causing horizontal scrollbar. I tried a few solutions on some blog-sites and stackoverflow, but could not resolve the issue.
Here are some screen shots:
- before clicking Send button http://imgur.com/wv2HZ
- after clicking Send button http://imgur.com/BRUeT
The code in View:
fbsend.html.erb (using HTML5 code)
<div class="right">
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-send" data-href="MY_SITE_URL"></div>
</div>
application.html.erb
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script src="http://connect.facebook.net/en_US/all.js#appId=MY_APP_ID&xfbml=1"></script>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<script>
FB.init({
appId: "MY_APP_ID",
cookie: true,
xfbml: true
});
</script>
How can I fix the issue, so the popup will fit in screen and won't cause horizontal scrollbar?
Thanks