Friend Activity Stream

The Friend Stream an activity statement of the users a specified user is following on Twitter and how their influence / outreach changes relative to the action metrics.

Endpoint: http://api.kred.com/FriendStream

Request - Required Parameters

  1. app_id (STRING) - Eight Digit Kredentials ID [ex: 84d8620b]
  2. app_key (STRING) - Thirty-two digit app kredentials key [ex: 281014ad8b0fba5adcc88fac7d79999c]
  3. Post app registration, your kredentials app id and key can be viewed by going to https://developer.peoplebrowsr.com/admin/applications and clicking "view

  4. Time Period - Only two of three of these need to be used in a string. First & Last, First & Count, or Last & Count. Last & Count will return results the easiest.

    • first (STRING) - Defines the start of the time period. If January 1 2012 to February 21, 2012 was the specification required, start with specifying the the first time point with first=2011-01-01. Alternatively, say the specification was between yesterday and today.
      • Example(s): first=2011-01-01 first=1323466328 or first=yesterday
    • last (STRING) - Defines the end of a time period. To continue the example above, if the date range specified is January 1, 2012 to February 21, 2011, specify last=2011-02-21. Alternatively say the time period you always wanted to measure was today. One could specify last=today, and then use count to specify 14, 30, up to 1000 days back relative to the time range enabled for the account on the API.
      • Example: last=2012-02-21 or last=1318195928 OR Yesterday OR Today OR Now
    • count (STRING) - Count is used as a period proxy to specified time periods. The standard time period is a day, so using count, you would specify the last 30, 60, 90, 100, to 1000 days by specifying last=today & count=30 (or another period length).
      • Example: count=1 OR 10 OR 100 OR 1000 to specify the time period backward or forward
  5. source (STRING) - source=twitter
  6. term (STRING) - username on Twitter. Term=kred (remove @ symbol)

Request - Sample URL

http://api.kred.com/FriendStream?&source=twitter&term=peoplebrowsr&app_id=12345&app_key=fds9sdf8wjf23

Response

Returns last 50 transactions in JSON.

Response - Fields

    1. action (STRING) - mention, reply, rt
    2. influence (NUMBER) - Influence score of user receiving the action that the term user is following
    3. outreach (NUMBER) - Outreach level of user receiving the action that the term user is following
    4. recipient_user_name (STRING) - Recipient receiving the action that erm user is following
    5. sender_user_name (STRING) - User who is doing the action to the user the term using is following
    6. source (STRING) - twitter
    7. timestamp (STRING) - unixtime timestamp when interaction occurred
  1. status (STRING) - submitted, processing, waiting (rarely), complete
  2. Sample Response

    {
        "data": [
            {
                "action": "rt",
                "influence": 886,
                "outreach": 6,
                "recipient_user_name": "beatlesvideo",
                "sender_user_name": "IvanMRea",
                "source": "twitter",
                "timestamp": 1330632066
            },
            {
                "action": "mention",
                "influence": 760,
                "outreach": 8,
                "recipient_user_name": "radicalrecruit",
                "sender_user_name": "mpheywood",
                "source": "twitter",
                "timestamp": 1330632058
            },
            {
                "action": "rt",
                "influence": 0,
                "outreach": 0,
                "recipient_user_name": "techcrunch",
                "sender_user_name": "shayerov",
                "source": "twitter",
                "timestamp": 1330632067
            },
            {
                "action": "mention",
                "influence": 779,
                "outreach": 7,
                "recipient_user_name": "jimkukral",
                "sender_user_name": "jmctigue",
                "source": "twitter",
                "timestamp": 1330632068
            },
            {
                "action": "reply",
                "influence": 799,
                "outreach": 9,
                "recipient_user_name": "ghostfinder",
                "sender_user_name": "halfpintstella",
                "source": "twitter",
                "timestamp": 1330632083
            },
            {
                "action": "reply",
                "influence": 752,
                "outreach": 6,
                "recipient_user_name": "peterstringer",
                "sender_user_name": "darbison",
                "source": "twitter",
                "timestamp": 1330632039
            },
            {
                "action": "reply",
                "influence": 729,
                "outreach": 5,
                "recipient_user_name": "canuckclicks",
                "sender_user_name": "MichaelOntkean",
                "source": "twitter",
                "timestamp": 1330632048
            },
            {
                "action": "mention",
                "influence": 0,
                "outreach": 0,
                "recipient_user_name": "gillianshaw",
                "sender_user_name": "chasetheory",
                "source": "twitter",
                "timestamp": 1330632038
            },
            {
                "action": "rt",
                "influence": 953,
                "outreach": 7,
                "recipient_user_name": "entmagazine",
                "sender_user_name": "missphenom",
                "source": "twitter",
                "timestamp": 1330632051
            },
            {
                "action": "mention",
                "influence": 987,
                "outreach": 4,
                "recipient_user_name": "m",
                "sender_user_name": "Palin_4_Prez",
                "source": "twitter",
                "timestamp": 1330632081
            },
            {
                "action": "reply",
                "influence": 760,
                "outreach": 8,
                "recipient_user_name": "radicalrecruit",
                "sender_user_name": "Delphi_Claire",
                "source": "twitter",
                "timestamp": 1330632050
            },
            {
                "action": "rt",
                "influence": 787,
                "outreach": 9,
                "recipient_user_name": "cheapseatfan",
                "sender_user_name": "iTwit06",
                "source": "twitter",
                "timestamp": 1330632085
            },
            {
                "action": "mention",
                "influence": 994,
                "outreach": 6,
                "recipient_user_name": "wordpressdotcom",
                "sender_user_name": "latabla_vivero",
                "source": "twitter",
                "timestamp": 1330632082
            },
            {
                "action": "mention",
                "influence": 0,
                "outreach": 0,
                "recipient_user_name": "techcrunch",
                "sender_user_name": "arnitorfa",
                "source": "twitter",
                "timestamp": 1330632052
            },
            {
                "action": "mention",
                "influence": 0,
                "outreach": 0,
                "recipient_user_name": "careersherpa",
                "sender_user_name": "Brandyourself",
                "source": "twitter",
                "timestamp": 1330632042
            },
            {
                "action": "mention",
                "influence": 871,
                "outreach": 5,
                "recipient_user_name": "gotye",
                "sender_user_name": "CyberSue",
                "source": "twitter",
                "timestamp": 1330632046
            },
            {
                "action": "rt",
                "influence": 851,
                "outreach": 9,
                "recipient_user_name": "thomaspower",
                "sender_user_name": "braniganmj",
                "source": "twitter",
                "timestamp": 1330632047
            },
            {
                "action": "mention",
                "influence": 891,
                "outreach": 7,
                "recipient_user_name": "b2community",
                "sender_user_name": "LoveDelray",
                "source": "twitter",
                "timestamp": 1330632061
            },
            {
                "action": "reply",
                "influence": 0,
                "outreach": 0,
                "recipient_user_name": "wedontlovehoes",
                "sender_user_name": "LoveKeyanna",
                "source": "twitter",
                "timestamp": 1330632076
            },
            {
                "action": "rt",
                "influence": 935,
                "outreach": 10,
                "recipient_user_name": "rockchristopher",
                "sender_user_name": "PoemTrees",
                "source": "twitter",
                "timestamp": 1330632055
            },
            {
                "action": "mention",
                "influence": 994,
                "outreach": 6,
                "recipient_user_name": "wordpressdotcom",
                "sender_user_name": "Mellfortes",
                "source": "twitter",
                "timestamp": 1330632044
            },
            {
                "action": "reply",
                "influence": 856,
                "outreach": 9,
                "recipient_user_name": "themichaelmoran",
                "sender_user_name": "Dante_Banks",
                "source": "twitter",
                "timestamp": 1330632075
            },
            {
                "action": "rt",
                "influence": 0,
                "outreach": 0,
                "recipient_user_name": "johncmaxwell",
                "sender_user_name": "FireIncATL",
                "source": "twitter",
                "timestamp": 1330632069
            },
            {
                "action": "reply",
                "influence": 742,
                "outreach": 7,
                "recipient_user_name": "inkblurt",
                "sender_user_name": "MartinHowitt",
                "source": "twitter",
                "timestamp": 1330632074
            },
            {
                "action": "mention",
                "influence": 994,
                "outreach": 6,
                "recipient_user_name": "wordpressdotcom",
                "sender_user_name": "SOLDADONOFRONT",
                "source": "twitter",
                "timestamp": 1330632079
            },
            {
                "action": "rt",
                "influence": 0,
                "outreach": 0,
                "recipient_user_name": "abc7",
                "sender_user_name": "Nichole_Machen",
                "source": "twitter",
                "timestamp": 1330632078
            },
            {
                "action": "rt",
                "influence": 0,
                "outreach": 0,
                "recipient_user_name": "techcrunch",
                "sender_user_name": "TechDigest360",
                "source": "twitter",
                "timestamp": 1330632045
            },
            {
                "action": "mention",
                "influence": 782,
                "outreach": 8,
                "recipient_user_name": "keithstoeckeler",
                "sender_user_name": "a0k",
                "source": "twitter",
                "timestamp": 1330632049
            },
            {
                "action": "rt",
                "influence": 763,
                "outreach": 7,
                "recipient_user_name": "moelnadi",
                "sender_user_name": "WestFour",
                "source": "twitter",
                "timestamp": 1330632057
            },
            {
                "action": "rt",
                "influence": 953,
                "outreach": 7,
                "recipient_user_name": "entmagazine",
                "sender_user_name": "VasillkaA",
                "source": "twitter",
                "timestamp": 1330632073
            },
            {
                "action": "mention",
                "influence": 781,
                "outreach": 7,
                "recipient_user_name": "simondumenco",
                "sender_user_name": "bobfetter",
                "source": "twitter",
                "timestamp": 1330632072
            },
            {
                "action": "reply",
                "influence": 894,
                "outreach": 8,
                "recipient_user_name": "cc_chapman",
                "sender_user_name": "murphysblues",
                "source": "twitter",
                "timestamp": 1330632060
            },
            {
                "action": "mention",
                "influence": 987,
                "outreach": 4,
                "recipient_user_name": "m",
                "sender_user_name": "melissafragoso_",
                "source": "twitter",
                "timestamp": 1330632071
            }
        ],
        "id": "999-032fcc4cc995238823fbc431e494a926",
        "request": {
            "app_id": "*****59d",
            "app_key": "******6e81893c76602d2d7b0d267f47",
            "external": true,
            "name": "friendstream",
            "source": "twitter",
            "term": "peoplebrowsr"
        },
        "status": "complete"
    }
    

PHP Code Sample