diff --git a/fb.admin.inc b/fb.admin.inc
index 4e83a5c..4e8ed5b 100644
--- a/fb.admin.inc
+++ b/fb.admin.inc
@@ -931,9 +931,8 @@ function fb_admin_get_app_token($fba, $secret) {
   $path = "https://graph.facebook.com/oauth/access_token?client_id=" . $fba . "&client_secret=" . $secret . "&grant_type=client_credentials";
   $http = drupal_http_request($path);
   if ($http->code == 200 && isset($http->data)) {
-    $parse = explode('=', $http->data);
-    $token = $parse[1];
-    return $token;
+  	 $token = drupal_json_decode($http->data);
+     return $token;
   }
   else {
     drupal_set_message(t('Failed to get application token. %detail.', array(
