How do the "On" State tweet actions work when used with the REST API v1.1?


I am trying to follow and “obey” the Developer Display Requirements on this page:

There are some requirements to display the tweet actions for each tweet - default and the hover image states seem obvious…
but I wanted to confirm and get some information on what the “On” State was for the Favorite and Retweet icons I found here:

If I understand correctly I thought the On State might be when a user has clicked the icon already, however I also thought that the tweet actions when it comes to the REST API might not be able to pick up the fact a user has clicked one of the buttons and then switch it on.

Am I correctly in understanding this correctly?

Thanks for any help in advance.


You’re not required to implement state sensitivity to these actions – that’s up to you and whether you think your user base would appreciate the additional finesse.

If a user has favorited or retweeted a tweet, and you’re using their access token to request that data, the perspectival fields “favorited” and “retweeted” will indicate with a boolean whether the user has performed those actions.

These fields aren’t always 100% accurate, as they rely primarily on data that’s available in-memory. It’s up to you whether you want to interpret them.


Thanks for getting back so quickly Taylor. Apologies for my slow response… I am having some trouble working out the best way to get my application which currently collects and displays a user’s (the person doing the tweeting) timeline of tweets, to ALSO get the user who reading the tweet’s to provide authority to my application to do this. Perhaps I am not asking the correct question. However I am currently using the php twitteroauth library described here.

I have looked at a number of links on twitter:

Perhaps I am looking in the wrong place but I am struggling to understand how I would convert the examples given to a PHP version to request, obtain, store the token of the “viewer’s permission” to access their twitter account for my feed to work.

Could you point me in the right direction please?

Thanks again,


Hi Taylor. Thanks for your quick reply. I did try the reply to your reply but seems to have disappeared into the ether. I am still having some trouble with working out how to get the permission data back.

I am not sure but would the process be something along the lines of a person reading the tweets clicking on one of the actions, the link to twitter then brings up the appropriate url and box for the reader to type in their tweet (where appropriate - if they aren’ logged in - it gets them to log in). At that point does twitter make a request if the current application can have an access token? Can I then store that access token in a session? Perhaps I have misunderstood. This is what I gleemed from this link:

I guess my next question would be - what happens once the authorisation code has been given. Each tweet being displayed would need to retrieve and/or request the data for each user reading the tweet to see if they have performed an action on it. Is that correct? Would it then not be some kind of streaming data request? Again apologies if I have misunderstood?

Perhaps you can point me in the direction of a good tutorial for PHP?

Thanks again.


onaylı hesap nasıl alcaz bi kısa anlattın bi