Open gaqzi opened 11 years ago
If you tell LikeGateMixin the target it'll force render the like gate outside of the page, then add:
<div style="width:810px;margin:10px auto;overflow: hidden;">
<div style="float:right;">
<div class="fb-like"
data-href="https://www.facebook.com/panasonicasia"
data-send="false"
data-layout="button_count"
data-width="50"
data-show-faces="false"></div>
</div>
</div>
if it's not a page. This is what I did for panasonic.
And then:
window.fbAsyncInit = function(){
FB.Canvas.setAutoGrow();
FB.Event.subscribe('edge.create', function(targetUrl){
top.location.href = "{{ this }}";
});
};
The same code gets copied around for our client projects for the like gate. And if we're going to make them work on mobile or purely on apps.facebook.com we need to add in the dynamic Like button from the JS API.
Similar to #50