Permalink
Browse files

Add Channel file to FB.init

  • Loading branch information...
jeherve committed Mar 14, 2012
1 parent 110c4e4 commit 0fef893872be1a3fac2296bd9b0e613c48c1300c
Showing with 14 additions and 6 deletions.
  1. +7 −0 lib/channel.php
  2. +7 −6 template.php
View
@@ -0,0 +1,7 @@
+<?php
+ $cache_expire = 60*60*24*365;
+ header("Pragma: public");
+ header("Cache-Control: max-age=".$cache_expire);
+ header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$cache_expire) . ' GMT');
+ ?>
+ <script src="//connect.facebook.net/en_US/all.js"></script>
View
@@ -85,12 +85,13 @@
<script>
window.fbAsyncInit = function() {
FB.init({
- appId : '<?php echo $facebook->getAppId(); ?>',
- session : <?php echo json_encode($session); ?>, // don't refetch the session when PHP already has it
- status : true, // check login status
- cookie : true, // enable cookies to allow the server to access the session
- xfbml : true, // parse XFBML
- oauth : true
+ appId : '<?php echo $facebook->getAppId(); ?>',
+ channelUrl : '<?php echo plugins_url( 'WP-Facebook-applications/lib/channel.php' , __FILE__ ); ?>', // Channel File
+ session : <?php echo json_encode($session); ?>, // don't refetch the session when PHP already has it
+ status : true, // check login status
+ cookie : true, // enable cookies to allow the server to access the session
+ xfbml : true, // parse XFBML
+ oauth : true
});
// whenever the user logs in, we refresh the page

0 comments on commit 0fef893

Please sign in to comment.