diff --git a/plugin/sns/facebook/examples/example.php b/plugin/sns/facebook/examples/example.php deleted file mode 100644 index a53b2f4f7..000000000 --- a/plugin/sns/facebook/examples/example.php +++ /dev/null @@ -1,105 +0,0 @@ - '119146498278078', - 'secret' => '6ffd7e325e2b4fbd83a2eebf9c6f33f9', -)); - -// Get User ID -$user = $facebook->getUser(); - -// We may or may not have this data based on whether the user is logged in. -// -// If we have a $user id here, it means we know the user is logged into -// Facebook, but we don't know if the access token is valid. An access -// token is invalid if the user logged out of Facebook. - -if ($user) { - try { - // Proceed knowing you have a logged in user who's authenticated. - $user_profile = $facebook->api('/me'); - } catch (FacebookApiException $e) { - error_log($e); - $user = null; - } -} - -// Login or logout url will be needed depending on current user state. -if ($user) { - $logoutUrl = $facebook->getLogoutUrl(); -} else { - $loginUrl = $facebook->getLoginUrl(); -} - -// This call will always work since we are fetching public data. -$naitik = $facebook->api('/naitik'); - -?> - - -
-'.htmlspecialchars(print_r($e, true)).''; - $user = null; - } -} - -?> - - - -
- -- -