Recently have a requirement in my work that required me to embed a YM online status on the web page. Get to know from my helpful colleague, where I can use YQL to do some query to get the status, what it will do is do a REST call and return us with a XML, and we can get the status within the XML.
After another round of searching, found a more simple way, using the URL in the image tag directly will made the life easier.
<a href="ymsgr:sendIM?YahooID"> <img src="http://opi.yahoo.com/online?u=YahooID&m=g&t=0" border="0"> </a>
Where the URL thingy in
<a> tag is the code that called up YM to send a message like how Live Messenger does (I guess, not yet tested with YM). The src in the
<img alt="" /> tag is to get the online status picture from Yahoo by passing in the ID, while the
t parameter is the image type, option from 0-24. Obviously, the
YahooID need to be replaced.