FacebookClientWrapper.SendMessageAsync Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Stuurt een REST-bericht naar 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)
Parameters
- path
- String
Pad naar het API-eindpunt, bijvoorbeeld /me/messages.
- payload
- FacebookMessage
Een object dat als parameters naar de API-aanroep wordt gestuurd.
- method
- HttpMethod
De HTTP-methode, bijvoorbeeld POST, GET, DELETE of PUT.
- cancellationToken
- CancellationToken
Een annuleringstoken dat kan worden gebruikt door andere objecten of threads om kennisgeving van annulering te ontvangen.
Retouren
Een taak die het werk vertegenwoordigt dat in de wachtrij staat om uit te voeren.
Uitzonderingen
path of payload null is.