-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautocanvas.php
36 lines (31 loc) · 958 Bytes
/
autocanvas.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<div id='fb-root'></div>
<script src="https://connect.facebook.net/en_US/all.js"></script>
<script type="text/javascript">
function ensure_init()
{
FB.init({
appId : "<?php echo $fbconfig['appid']; ?>", //APPLICATION ID
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
FB.Canvas.setAutoGrow();
FB.XFBML.parse();
}
ensure_init();
</script>
<div id="fb-root"></div>
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({appId: '<?php echo $fbconfig['appid']; ?>', status: true, cookie: true, xfbml: true});
window.setTimeout(function() {
FB.Canvas.setAutoResize(true,900);
}, 250);
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>