Playing around with the Facebook Graph API and the Facebook PHP SDK. Having a problem using json_decode(), I keep getting the error "json_decode() expects parameter 1 to be string".
if ($fbme) {
try {
$pages = $facebook->api('/me/accounts');
}
catch(Exception $o) {
d($o);
}
}
$pages = json_decode($pages, true);
foreach ($pages->data as $page) {
echo $page->name;
echo $page->category;
echo $page->id;
}