问题
Is it possible to display a user's online status without Active-X? In my googling I've found a number of articles about displaying MOC online status on Sharepoint using the IMNRC() function in the OWS.js file but this seems pretty old-skool with all of the Active-X object instantiation and as a result will only work in Internet Explorer.
Is there a simple method of getting an online status using some kind of back-end API call to the communication server by passing their email address?
cheers Marcus
回答1:
I contribute to a CodePlex project called HTML Presence Controls for Microsoft Lync Server 2010 - check it out at http://htmlpresencecontrols.codeplex.com/.
As Paul mentioned above, the architecture behind such a solution would be create a backend service that exposes WCF methods to query the presence of contacts. You could query that from an ASP.NET server control in an ASPX page, or even a JavaScript implementation in HTML or PHP.
The CodePlex project should give you a good idea of how to build something like that.
回答2:
This depends on which version of OCS/Lync server you are using. If you are using OCS 2007 (not R2), you could use the AJAX API to get the users presence.
However, the AJAX API has been deprecated, so the "right" way to do it would be to create a bot application using UCMA (UCMA 1.0 for OCS 2007, UCMA 2.0 for OCS 2007 R2 and UCMA 3.0 for Lync server)
You would need to implement a server side UCMA application (a bot) that connects to the OCS/Lync infrastructure, and exposes a few methods via WCF or Web Services, that could then be called by some client-side javascript.
Alternatively, if you are using Lync and your app is Silverlight based, you could use the Silverlight controls in the Lync SDK - there is a great overview article here.
回答3:
Buyer beware...
The alternative Silverlight controls in the Lync SDK are only supported in IE because they use ActiveX under the covers.
It seems to me that the recommended UCMA application should be implmented by the Lync server itself. If that were done, the Silverlight ctrl wouldn't need ActiveX and would actually be useful.
来源:https://stackoverflow.com/questions/3555316/how-do-i-display-an-moc-users-online-status-on-a-web-page-without-active-x