Is there any way to verify that the user owns the fan page or get the id of the owner or admin of the fan page? I tried as well but it did not work, I've read a lot but did not find anything.
$facebook = new Facebook(array(
'appId'=>'', // replace with your value
'secret'=>'' // replace with your value
));
$signedRequest = $facebook->getSignedRequest();
if( $signedRequest['page']['admin'] )
/me/accounts
with the manage_pages
permission returns a list of all Pages you manage. That´s how you can check out if the authorized User manages a Page.
In a Page App, it´s possible with the signed_request
parameter, as you found out. Not sure what "it didn´t work" means, you should debug $signedRequest. Here are the fields: https://developers.facebook.com/docs/reference/login/signed-request
Of course this only works in a Page App - meaning, in the iframe of an App, on a Facebook Page.