diff --git a/fblikes.snippet.php b/fblikes.snippet.php index da369eb..44b5333 100644 --- a/fblikes.snippet.php +++ b/fblikes.snippet.php @@ -42,7 +42,7 @@ // get page information from facebooks graph api (returns json data) $graphdata = file_get_contents("http://graph.facebook.com/".$pageid); // decode json response - $response = json_decode($graphdata, true); + $response = $modx->fromJSON($graphdata); // get like number $data = $response['likes'];