Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FacebookChatApi

Hierarchy

  • FacebookChatApi

Implements

  • ChatApi
  • MessageListener

Index

Constructors

constructor

Methods

changeThreadColor

  • changeThreadColor(threadId: FacebookId, color: string): Promise<void>

getCurrentUserId

  • getCurrentUserId(): FacebookId

getThreadHistory

  • getThreadHistory(threadId: FacebookId, amount: number, timestamp?: undefined | number): Promise<Message[]>
  • Parameters

    • threadId: FacebookId
    • amount: number
    • Optional timestamp: undefined | number

    Returns Promise<Message[]>

getThreadInfo

  • getThreadInfo(threadId: FacebookId): Promise<ThreadInfo>

getUserId

  • getUserId(name: string): Promise<UserIdSearchResult[]>

getUserInfo

  • getUserInfo(ids: FacebookId | FacebookId[]): Promise<UserInfoResult>

handleMessageRequest

  • handleMessageRequest(threadId: FacebookId, shouldAccept: boolean): Promise<void>

listen

  • listen(handler: MessageHandler): StopListeningFunction

markAsRead

  • markAsRead(threadId: FacebookId): Promise<void>

resolvePhotoUrl

  • resolvePhotoUrl(photoId: FacebookId): Promise<string>

sendMessage

  • sendMessage(threadId: FacebookId, message: OutgoingMessage | string): Promise<Message>
  • Parameters

    • threadId: FacebookId
    • message: OutgoingMessage | string

    Returns Promise<Message>

sendTypingIndicator

  • sendTypingIndicator(threadId: FacebookId): Promise<EndTypingIndicatorFunction>

setMessageReaction

  • setMessageReaction(messageId: FacebookId, reaction: Reaction | string): Promise<void>

Generated using TypeDoc