FacebookClientWrapper.SendMessageAsync 方法

定义

将 REST 消息发送到 Facebook。

public virtual System.Threading.Tasks.Task<string> SendMessageAsync(string path, Microsoft.Bot.Builder.Adapters.Facebook.FacebookMessage payload, System.Net.Http.HttpMethod method = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SendMessageAsync : string * Microsoft.Bot.Builder.Adapters.Facebook.FacebookMessage * System.Net.Http.HttpMethod * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
override this.SendMessageAsync : string * Microsoft.Bot.Builder.Adapters.Facebook.FacebookMessage * System.Net.Http.HttpMethod * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
Public Overridable Function SendMessageAsync (path As String, payload As FacebookMessage, Optional method As HttpMethod = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of String)

参数

path
String

API 终结点的路径,例如 /me/messages

payload
FacebookMessage

要作为参数发送到 API 调用的对象。

method
HttpMethod

HTTP 方法,例如 POST、GET、DELETE 或 PUT。

cancellationToken
CancellationToken

可由其他对象或线程用以接收取消通知的取消标记。

返回

一个任务,表示排队要执行的工作。

例外

pathpayload 为 null。

适用于