Tokens health and API troubleshouting


#1

Hello everybody,

i’m new on twitter API and i’ve some troubleshooting.

I want to add a banner with marquee which content tweets from my account, i’ve do it successfull, but after a few time, twitter revoke my tokens :frowning:
Here is my code :

// Twitter
$twitter = new TwitterOAuth($consumer_key, $consumer_secret,$oauth_token,$oauth_token_secret);

			$query = 'https://api.twitter.com/1.1/statuses/home_timeline.json?screen_name=momcards';
			$content = $twitter->get($query);</code>

I’m using twitterOAuth class

Here is what i obtain : http://93.1.38.151/test/fr/index.php
(bottom of page)

when you go to another page, i do another query which get again the tweets from my account


#2

We don’t tend to randomly revoke tokens – are you sure that you aren’t accidentally invalidating your access tokens through the OAuth process, on dev.twitter.com/apps, or the Twitter website? How are you detecting whether tokens are revoked?