This module provides utility functions for tracking social media posts.
- Source:
Methods
(static) enablePrivateWindows()
Configure listeners to run in private windows.
- Source:
(static) getFacebookPostContents(postId, ownerId)
Get the contents and attachments of a Facebook post.
Parameters:
Name | Type | Description |
---|---|---|
postId |
the unique ID of the post |
|
ownerId |
the unique ID of the owner, or of the group, if the post is in a group |
- Source:
(static) getRedditThingContents(thingId)
Retrieve a reddit comment or post ("thing" is the official Reddit term)
Parameters:
Name | Type | Description |
---|---|---|
thingId |
the unique ID of the post or comment, with identifier ("t1_" or "t3_") |
- Source:
Returns:
- see Reddit API
(static) getTweetContent(tweet_id)
Request the content of a tweet, then filter and deduplicate the urls and return the relevant ones.
Parameters:
Name | Type | Description |
---|---|---|
tweet_id |
string | the numerical ID of the tweet to retrieve |
- Source:
Returns:
- see Twitter API
(static) registerFacebookActivityTracker(callback, Stringopt, blocking)
Register a callback for specific Facebook events. Supported events are "post", "reshare", "react" (includes like, love, etc), and "comment".
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
the function to call when the event happens |
||
String |
<optional> |
events - array of events to be tracked |
|
blocking |
whether the listener should be blocking. Allows canceling the event. |
- Source:
(static) registerRedditActivityTracker(callback, Stringopt, blocking)
Register a callback for specific Reddit events. Supported events are "post", "comment", "postVote", and "commentVote".
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
the function to call when the event happens |
||
String |
<optional> |
events - array of events to be tracked |
|
blocking |
whether the listener should be blocking. Allows canceling the event. |
- Source:
(static) registerTwitterActivityTracker(callback, Stringopt, blocking)
Register a callback for specific Twitter events. Supported events are "tweet" (includes tweet variants such as replies), "retweet", and "favorite".
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
the function to call when the event happens |
||
String |
<optional> |
events - array of events to be tracked |
|
blocking |
whether the listener should be blocking. Allows canceling the event. |
- Source: