document.location.href = "<?php echo $config['baseurl']; ?> "; } function logout(){ document.location.href = "<?php echo $config['baseurl']; ?> "; } </script> <style type="text/css"> .box{ margin: 5px; border: 1px solid #60729b; padding: 5px; width: 500px; height: 200px; overflow:auto; background-color: #e6ebf8; } </style> <?php showArrays($feeds); ?> </body> </html>
<?php $fbconfig['appid'] = "195377683831047"; $fbconfig['api'] = "9278da5e1ad4636708295b026c14d8ce"; $fbconfig['secret'] = "1ad66f1d79477de016069d7ebc408e13"; try { require_once 'src/facebook.php'; } catch (Exception $o) { echo "PEPEPEPE"; showArrays($o); } // Create our Application instance. $facebook = new Facebook(array('appId' => $fbconfig['appid'], 'secret' => $fbconfig['secret'], 'cookie' => true)); // We may or may not have this data based on a $_GET or $_COOKIE based session. // If we get a session here, it means we found a correctly signed session using // the Application Secret only Facebook and the Application know. We dont know // if it is still valid until we make an API call using the session. A session // can become invalid if it has already expired (should not be getting the // session back in this case) or if the user logged out of Facebook. /*$session = $facebook->getSession(); $fbme = null; // Session based graph API call. if ($session) { try { $uid = $facebook->getUser(); $fbme = $facebook->api('/me'); } catch (FacebookApiException $e) { showArrays($e); } }*/