Anywhere get mentions


Hello guys :slight_smile:

Well, I’ve been making a sort of minimalist client for twitter only using anywhere but I’m unable to get the user mentions… after reading a bit the anywhere code, I found that doing this:

if (T.isConnected()) {

Throws an object with a bunch of functions, which I don’t know how to use. Tracking the network I found the script made a successful request to with my current access token in a get variable, and that the request answered with my last mentions in a json format. So they should be stored somewhere! How can I get them?

Many thanks for such a great API.


Not sure if you found out how to do this, but here it is anyway:

T.currentUser.mentions().first(20).each(function(status) {

will display the text of each mention. You can get all the other bits of data by pulling them out of the status variable… status.user.screenName (who it’s from) etc


Wow! thank you! I went to the server instead but this is wonderful! I’ll use it very soon :slight_smile: thank you a lot.

Another thing, is there a well explained resource for this details? I think it drastically increase Anywhere’s potential.


You’re welcome.
There doesn’t appear to be any proper documentation for @anywhere, not sure why this is, Twitter don’t seem to want to encourage developers to use it. They have their main page explaining the tweetbox etc, but none of these other functions. I’ve worked them out by searching on google and various blog posts for specific commands. Also, once you know the above example, you can work out how to do other things by reading the standard REST API docs… or I guess, just ask on this forum.



I tried this and cant get data to display. Here is what I have:

I’m trying to get a list of my 5 latest mentions…Any help would be awesome! Thanks!


well thank you


my local computer still seems to be aware about the twitter account after Twitter Signout.
I integrated Twitter into one of the websites that I am creating. However, when I signout of twitter from my webpage that includes the code for @Anywhere, my local computer still seems to be aware about the twitter account. In other words, if I sign in to twitter again using the “Connect to Twitter” button, a small popup screen comes up asking me if I want to connect with my existing twitter account. I want the person to Sign out completely, and any attempts to Connect to Twitter again using my webpage should force the user to enter Twitter LoginID and password again. I pasted some of my JavaScript code below. May I please know how I can make the Twitter signout code within my webpage to force the user signout “completely” ?
scripttype=”text/javascript”>twttr.anywhere.config({ callbackURL: “”});//This function Updates HTML elements functionupdate(T){if
document.getElementById((T.isConnected()) {‘user’).innerHTML = ‘Logged in as : ‘+‘screen_name’);’logout’).innerHTML = ‘Sign out of Twitter‘; //Add tweet box T(
height: 100,
width: 400,
defaultContent: “#tbox”).tweetBox({“”});
update(T);function(T) {//connect button T(
authComplete: ‘#login’).connectButton({ function(loggedInUser) { // triggered when auth completed successfully update(T);
location.reload(); //reload the page },
signOut: function() { // triggered when user logs out document.getElementById(
location.reload(); ‘logout’).innerHTML = ”;’tbox’).innerHTML = ”;’user’).innerHTML = ”;// reload the page}