The Facebook JSON is stored inside a "data" index, which is an array, so you will need to access the 0-th element of the "data" array (or, in this case, the data object, since you aren't using the JSON as an array) to get the data you want:
<?php
$graph = json_decode(file_get_contents("https://graph.facebook.com/122243664545681/photos"));
$picture = $graph->data[0]->picture;
$pageid = $graph->data[0]->id;
echo $picture.' '.$pageid;
?>
If you perform a var_dump on the "data" object it becomes a little more obvious how you should be accessing the JSON data:
<?php
$graph = json_decode(file_get_contents("https://graph.facebook.com/122243664545681/photos"));
var_dump($graph->data);
?>