在 Rails 应用程序中获取用户的 Skype 状态
我有一个 Rails 应用程序,用户在其中提供他的 Skype 地址。当有人看到他的个人资料时,我希望能够确定用户的 Skype 状态(在线或离线)。我如何在我的应用程序中做到这一点?有谁知道有现成的 gem/插件吗?
I have a rails application in which user provides his skype address.I want to able to determine the skype status of the user(online or offline) when some one sees his profile. How can i do that in my application? Does any know of a ready to use gem/plugin?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
仅向访问者显示状态并不真正要求您自己获取状态。
最简单的方法是让访问者浏览器联系 Skype 本身来查询状态。然而,正如艾曼塔斯指出的那样。用户必须允许从网络上显示状态。
之后,它只是一个简单的 javascript 和 html:
此脚本还允许您通过 Skype 呼叫此人,如果您不想要该功能,则仅包含图像并跳过链接和 javascript 就足够了。
如果你想要更多的选择。
Only showing the status to the visitor doesn't really require you to do fetch the status yourself.
The easiest way to do it is to let the visitors browser contact Skype itself to query the status. However, as Eimantas pointed out. The user must be allowing the status to be shown from the web.
After that, it's just a simple javascript and html:
This script also lets you call the person through skype, if you don't want that functionality it should be enough to include only the image and skip the link and the javascript.
Have a look at http://www.skype.com/share/buttons/ if you want more alternatives.
首先 - 用户必须允许您查看他/她的在线 Skype 状态。之后 - 如果你阅读 Skype api 就很容易了。或者只是谷歌搜索任何 gem/插件
First off - user must allow you to see his/her online skype status. After that - it's easy if you read skype api. Or just google for any gem/plugin