New twitter api not respond twitter userid or username?


#1

Hello Everybody,

  • Below is my code for authentication with twitter.

$twitteroauth = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET);
// Requesting authentication tokens, the parameter is the URL we will be redirected to
$twtname=$_POST[‘twtname’];
$user_info = $twitteroauth->get(‘users/show’,array(‘screen_name’=>$twtname));

But Problem is before few days twitter api not respond any userid and twittername in json format.

i was also change https://api.twitter.com/1.1/ instead of https://api.twitter.com/1/

reply me what to do with above code.

Thanks.


#2

Does your get() method append “.json”? If not, that looks to be your problem.

$user_info = $twitteroauth->get('users/show',array('screen_name'=>$twtname));

Should be:

$user_info = $twitteroauth->get('users/show.json',array('screen_name'=>$twtname));

#3

@ ncttest8 ncttest8
Hello mindenkinek,

Az alábbiakban a kód hitelesítés twitter.
$ Twitteroauth = new TwitterOAuth (CONSUMER_KEY, CONSUMER_SECRET)
/ / kérése hitelesítés tokenek, a paraméter az URL leszünk irányítva
$ twtname = $ _POST [‘twtname’]
= $ $ user_info twitteroauth-> get ('users / mutatják ", array (‘screen_name’ => $ twtname));

De a probléma az előtt pár nappal twitter api nem reagál semmilyen felhasználói azonosító és twittername JSON formátumban,