JSON result not showing

im trying to generate a json object using this plugin but im getting white page.

function social($site) {

// Get Site Settings

// Response Details
$response_details = [
	'facebook' => kirby()->site()->facebook(),
	'twitter' => kirby()->site()->twitter()
];

// Response MSG
$resp = [
	'msg' => 'List of Social Networks Links',
	'details' => $response_details,
];

return json_encode($resp);

}

However if put single quote on response_details value, the json works.

$response_details = [
	'facebook' => 'kirby()->site()->facebook()',
	'twitter' => 'kirby()->site()->twitter()'
];

Here’s my route

	'pattern'=> 'api/social',
	'method' => 'GET',
	'action' => function() {
        // get the query which is part of the URL.
		$site = site();
		$data = social($site);
        // $data['success'] = true;
		return response::json($data);
	}

You can use value() instead to get a string instead of a field object

kirby()->site()->facebook()->value()

That works. Thank you