An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 4.4% on proxy.golang.org
Top 4.2% dependent packages on proxy.golang.org
Top 4.7% dependent repos on proxy.golang.org

proxy.golang.org : github.com/stevenxie/fbmsgr

Package fbmsgr provides an API for interacting with Facebook Messenger. The first step is to create a new Messenger session. Do this as follows, replacing "USER" and "PASS" with your Facebook login credentials: Once you are done with a session you have allocated, you should call Close() on it to clear any resources (e.g. goroutines) that it is using. When sending a message, you specify a receiver by their FBID. The receiver may be another user, or it may be a group. For most methods related to message sending, there is one version of the method for a user and one for a group: To send or retract a typing notification, you might do: To send an attachment such as an image or a video, you can do the following: It is easy to receive events such as incoming messages using the ReadEvent method: With the EventStream API, you can get more fine-grained control over how you receive events. For example, you can read the next minute's worth of events like so: You can also create multiple EventStreams and read from different streams in different places. To list the threads (conversations) a user is in, you can use the Threads method to fetch a subset of threads at a time. You can also use the AllThreads method to fetch all the threads at once.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/stevenxie/fbmsgr
License: BSD-2-Clause
Latest release: over 6 years ago
First release: over 6 years ago
Namespace: github.com/stevenxie
Dependent packages: 2
Dependent repositories: 1
Last synced: about 10 hours ago

    Loading...
    Readme
    Loading...