Social Media

Overview

The social media endpoint contains all social media information related to a business. You can use this endpoint to display data, create reports, send notifications, and more.

Default Fields

The following fields are used to access social media data:

Field

Type

Description

id

int

The ID associated to a social media object. Every social media object will have a unique ID.

message

string

If someone wrote a message within their post, this is what they said.

created_time

string

The time the post was written in isoformat.

author

JSON

The author is a data_source dependent JSON object that will have different fields to reflect the differences found on the data_source.\
There is a table below with examples of the differences organized by data_source.\
Usually contains a username, picture, and id belonging to the entity that authored the post.

interaction

JSON

The interaction is a data_source dependent JSON object that will have different fields to reflect the differences found on the data_source.\
There is a table below with examples of the differences organized by data_source.\
Usually a list of different interactions people have with the post; e.g. likes, retweets, etc.

link

string

The url of the original media object on the data source.

media_type

character

A single character correlating to the type of media post it is.\
'O': Original, a post that was made using the profile associated to the business.\
'M': Mention, a post that contains a tag being tracked by the business via Reply Pro\
'C': Comment, a reply/comment left on a social post\
'S': Share, a post that was shared/retweeted by the profile associated to the business.

picture

string

Url source of the image file.

Additional Fields

The following fields are used to access additional social media data:

Field

Type

Description

data_source

string

This field can be used to query for social media by data source name, however it will not be returned by the endpoint.

List All Social Media

Use this URL to request all social media for a specified business. This will return every social media object the business has ever received - in paginated form.

https://ad1.replypro.io/api/public/accounts/<account_id>/companies/<company_id>/businesses/<business_id>/social-media

Example of returned data:

{
    "next": null,
    "previous": null,
    "results": [
        {
            "message": "Cross something amazing off your bucket list  SIP PEEL WIN today! \n\nNo Purch Nec. US, 13+. Ends 10/15/18 or while supplies last.  For free piece & official rules: http://spr.ly/6011DxPZU .pic.twitter.com/jbZY1K91sz",
            "interaction": {
                "summary": {
                    "total_count": 149
                },
                "data": [
                    {
                        "name": "VibeWithBleu",
                        "id": "483195218",
                        "type": "LIKE"
                    },
                    "...",
                    {
                        "name": "Celtics12",
                        "id": "33898086",
                        "type": "LIKE"
                    }
                ]
            },
            "author": {
                "name": "dunkindonuts",
                "avatar": "https://pbs.twimg.com/profile_images/979784250055589888/OwoFc-Oo_bigger.jpg",
                "id": "8771022",
                "full_name": "Dunkin' Donuts"
            },
            "id": 1035667,
            "picture": "https://ad1.replypro.io/media/images/Dlyg2HwV4AEbozO.jpg",
            "created_time": "2018-08-27T07:30:24Z"
        },
        {
            "message": "we serve all types all ways…how about mobile ordering for you next time? ",
            "interaction": {
                "summary": {
                    "total_count": 452
                },
                "data": []
            },
            "author": {
                "name": "dunkindonuts",
                "avatar": "https://pbs.twimg.com/profile_images/979784250055589888/OwoFc-Oo_bigger.jpg",
                "id": "8771022",
                "full_name": "Dunkin' Donuts"
            },
            "id": 1035668,
            "picture": null,
            "created_time": "2018-08-29T06:49:30Z"
        },
        {
            "message": "Okay. I give in. I'm a Yankee, and I will always be a Yankee, but I must admit that @krispykreme donuts are undeniably superior to @dunkindonuts.",
            "interaction": {
                "summary": {
                    "total_count": 0
                },
                "data": []
            },
            "author": {
                "name": "tomfeister",
                "id": "18324636",
                "avatar": "https://pbs.twimg.com/profile_images/714062810116964352/POc1kH-1_bigger.jpg",
                "full_name": "tomfeister"
            },
            "id": 1035669,
            "picture": null,
            "created_time": "2018-08-29T12:21:11Z"
        }
    ]
}

Get a Social Media Object

Use this URL to request a single social media object:

https://ad1.replypro.io/api/public/accounts/<account_id>/companies/<company_id>/businesses/<business_id>/social-media/<social_media_id>

Example of returned data:

{
    "next": null,
    "previous": null,
    "results": [
        {
            "message": "Okay. I give in. I'm a Yankee, and I will always be a Yankee, but I must admit that @krispykreme donuts are undeniably superior to @dunkindonuts.",
            "interaction": {
                "summary": {
                    "total_count": 0
                },
                "data": []
            },
            "author": {
                "name": "tomfeister",
                "id": "18324636",
                "avatar": "https://pbs.twimg.com/profile_images/714062810116964352/POc1kH-1_bigger.jpg",
                "full_name": "tomfeister"
            },
            "id": 1035669,
            "picture": null,
            "created_time": "2018-08-29T12:21:11Z"
        }
  ]
}

Data Source Specific Json

Facebook Author:

field

type

description

picture

JSON

The JSON representing the avatar used by the author.

  • *data**: the key within the picture JSON accessing yet another JSON
  • *data >> width**: int, the width of the image, usually 50.
  • *data >> is_silhouette**: bool, tells if the entity has a profile picture set or not.
  • *data >> url**: string, the url of the avatar used by the entity. This image should be stored locally if you want to have access to it later on.
  • *data >> height**: int, the height of the image, usually 50.

id

int

The id of the entity who authored the post. The id is not always included and is most often omitted when the author is a page or business.

name

string

The name of the entity who authored the post.

Twitter Author:

field

type

description

name

string

The user name as it appears on twitter.

id

string

The id used by twitter to reference the user.

avatar

string

A url to the image associated with the the user on twitter

full_name

string

The full name of the user if given.

Twitter and Facebook Interaction:

field

type

description

summary

JSON

A JSON object containing a breakdown of the counts of interactions; at present: total_count

data

array

A list of json objects describing the publicly viewable interactions with the twitter post. The length of this array is not always the same as total_count so they should not be used interchangeably.

summary >> total_count

int

A count of the total number of interactions. This number is not always the length of data so it should not be used interchangeably so.

🚧

data.length vs total_count

Because data only includes publicly viewable objects, it does not reflect the any and all interactions with the post.

Filtering

Looking to filter by specific values in a field? Checkout Filters