FacebookClientWrapper.SendMessageAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sends a REST message to 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
Path to the API endpoint, for example /me/messages
.
- payload
- FacebookMessage
An object to be sent as parameters to the API call.
- method
- HttpMethod
The HTTP method, for example POST, GET, DELETE or PUT.
- cancellationToken
- CancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
A task that represents the work queued to execute.
Exceptions
path
or payload
is null.