<?php

function decodeSignedRequest($signedRequest){

	list($encodedData, $encodedSignature) = explode('.', $signedRequest, 2);
	
	$jsonStr = base64_decode($encodedData);
	return json_decode($jsonStr, true);
	
}