From da12e61675eb372ecbf5b261015b8e9efb584c37 Mon Sep 17 00:00:00 2001 From: THEtheChad Date: Mon, 22 Apr 2013 20:29:31 -0500 Subject: [PATCH] access_token working, need to add refresh mechanism --- sync-facebook-events.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sync-facebook-events.php b/sync-facebook-events.php index c617c15..0e75326 100644 --- a/sync-facebook-events.php +++ b/sync-facebook-events.php @@ -65,6 +65,8 @@ function fbes_get_events($fbes_api_key, $fbes_api_secret, $fbes_access_token, $f 'cookie' => true, )); + $facebook->setAccessToken($fbes_access_token); + $ret = array(); foreach ($fbes_api_uids as $key => $value) { if($value!='') { @@ -233,6 +235,10 @@ function fbes_options_page() { 'secret' => $fbes_api_secret, 'cookie' => true, )); + $facebook->setAccessToken($fbes_access_token); + + $events = fbes_get_events($fbes_api_key, $fbes_api_secret, $fbes_access_token, $fbes_api_uids); + echo "
".json_encode($events, JSON_PRETTY_PRINT)."
"; ?>