Buenas!
Ayer estuve lidiando con la API de FB para PHP, y me he encontrado con un problema que no se como resolver...
Tengo todo configurado, los persmisos user_events y friend_events, sin embargo una consulta no me funciona...
Código PHP:
Ver original<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_US">
<head>
<meta property="og:title" content="This Page Title"/>
<meta property="og:url" content="miweb.com"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en" />
<meta name="GENERATOR" content="PHPEclipse 1.2.0" />
<title>title</title>
</head>
<body>
<?php
$f = new Facebook($config); //la config está bien
$user_id = $f->getUser();
if($user_id){
try{
$ret = $f->api(array('method' => 'fql.query', 'query' => 'select eid, uid, rsvp_status
from event_member
where uid = '.$user_id.';'));
}catch(FacebookApiException $e){
$login_url = $f->getLoginUrl();
echo('Please, <a href="'.$login_url.'">log in</a>');
echo('<hr />');
}
}else{
$login_url = $f->getLoginUrl();
echo('Please, <a href="'.$login_url.'">log in</a>');
}
?>
Y me devuelve un array vacío...
Sin embargo, si hago otra consulta, como "select name from user where uid = $user_id", sí funciona
¿Qué estoy haciendo mal?¿Qué falla?
En la herramienta de debug de FQL me funciona el select...
Gracias