Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/12/2013, 05:49
charlyta
 
Fecha de Ingreso: junio-2008
Mensajes: 291
Antigüedad: 15 años, 10 meses
Puntos: 9
Leer mensajes directos con API Twitter

Hola. Necesito ayuda para ver qué hay mal en mi código. En

teoría todo es correcto y mi app está bien configurada. Vosotros veis algo? Feliz Navidad!!

Código PHP:
$settings = array(
    
'oauth_access_token' => "xxx",
    
'oauth_access_token_secret' => "xxx",
    
'consumer_key' => "xxx",
    
'consumer_secret' => "xxx"
);

$url 'https://api.twitter.com/1.1/direct_messages.json';

$getfield '?count=5';

$requestMethod 'GET';

$twitter = new TwitterAPIExchange($settings);
$string json_decode($twitter->setGetfield($getfield)
             ->
buildOauth($url$requestMethod)
             ->
performRequest(),$assoc TRUE);

foreach(
$string as $items){ 
    echo  
$items['text'];
   }