昔、3系のSDKを使っていたのですが
しばらく見ないうちに4系がでていて、あたふたしてます。
https://developers.facebook.com/docs/graph-api/using-graph-api/v2.2?locale=ja_JP
/* PHP SDK v4.0.0 */
/* make the API call */
$request = new FacebookRequest(
$session,
'GET',
'/me'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
で取得した、$graphObject
は、backingData:protected
と守られているので
modify
$request = new FacebookRequest(
$session,
'GET',
'/me'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
$data = $graphObject->asArray();
として、取得する必要がありました。