Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/03/2014, 11:45
mktalternativa
 
Fecha de Ingreso: enero-2012
Mensajes: 224
Antigüedad: 12 años, 3 meses
Puntos: 1
Api twitter 1.1 problemas

Hola estoy usando esta funcion y la llamo asi

<?php get_tweet(); ?>


pero no me esta funcionando , no me devuelve nada que puedo hacer
Código:
function get_tweet() {
 
require 'wp-content/themes/vhm2014/twitteroauth/tmhOAuth.php';
 
$tmhOAuth = new tmhOAuth(array(
 'consumer_key' => 'key here',
 'consumer_secret' => 'key here',
 'user_token' => 'key here',
 'user_secret' => 'key here',
 'curl_ssl_verifypeer' => false
));
 
$code = $tmhOAuth->request('GET', $tmhOAuth->url('1.1/statuses/user_timeline'), array(
 'screen_name' => 'simplistips',
 'count' => '1'));
 
$response = $tmhOAuth->response['response'];
$tweets = json_decode($response, true);
echo($tweets[0]['text']);
 
}