twilio-csharp 在 Mono 中工作吗?
你好,我最近一直在摆弄 Twilio 和他们的官方 twilio-csharp 库。我在 Linux 上的 mono 2.10.5(x86-64) 上使用它,但在运行基本示例时遇到问题。
我的代码:
var twilio = new TwilioRestClient("[accountsid]", "[authkey]");
var msg = twilio.SendSmsMessage("+1316313XXXX, "+1918917XXXX", "I'm a monkey Mr. Anderson");
看起来很简单,但是运行它时,返回的 msg 对象为 null 并且没有发送消息。这是我做错了什么还是这个库不能在 Mono 中工作?
Hello I've recently been messing around with Twilio and their official twilio-csharp library. I'm using it on mono 2.10.5(x86-64) on Linux and I'm having problems getting a basic example working.
My code:
var twilio = new TwilioRestClient("[accountsid]", "[authkey]");
var msg = twilio.SendSmsMessage("+1316313XXXX, "+1918917XXXX", "I'm a monkey Mr. Anderson");
Seems to be very simple but when running it, the msg object returned is null and no message gets sent. Is this something I'm doing wrong or does the library not work in Mono?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
此页面详细介绍了该问题: http://www.mono-project.com/UsingTrustedRootsRespectively
基本上,Mono 不附带任何根证书颁发机构。因此,快速而肮脏的解决方法是信任所有证书:
这不是很安全,但根据您的用途,这可能并不重要。
The problem is detailed in this page: http://www.mono-project.com/UsingTrustedRootsRespectfully
Basically, Mono doesn't ship with any root certificate authorities. So, the quick and dirty fix is to trust all certificates:
It's not very secure, but depending on your uses, it may not matter.
如果这对遇到这个问题的其他人有帮助,我将 monotouch/for android 项目添加到 twilio-csharp 的这个分支中:
https://github.com/joelmartinez/twilio-csharp
将更改折叠到主项目中的拉取请求是 待定 截至撰写本答案:)
In case it's helpful for anyone else that come across this question, I added monotouch/for android projects to this fork of twilio-csharp:
https://github.com/joelmartinez/twilio-csharp
pull request to fold the changes into the main project is pending as of the writing of this answer :)