Integrating My twitter data to my application by using json requests Automatically

api

#1

Hi,
My requirement is to automate the daily twitter data like Followers_count Tweets_count, reTweets_count etc…
for this i want to use Json requests.
Please help me to reach this.


#2

@CallHealthIndia: Depending on what information you’re looking for, you can use the GET statuses/show/:id endpoint. This returns both tweet (specified by the id parameter) and user data. Below is an example. (Note: you will typically see and specify tweet ids such as 757561453079474178.)

$ twurl -H api.twitter.com "/1.1/statuses/show.json?id=20" | jq
{
  "created_at": "Tue Mar 21 20:50:14 +0000 2006",
  "id": 20,
  "id_str": "20",
  "text": "just setting up my twttr",
  "truncated": false,
  "entities": {
    "hashtags": [],
    "symbols": [],
    "user_mentions": [],
    "urls": []
  },
  "source": "<a href=\"http://twitter.com\" rel=\"nofollow\">Twitter Web Client</a>",
  "in_reply_to_status_id": null,
  "in_reply_to_status_id_str": null,
  "in_reply_to_user_id": null,
  "in_reply_to_user_id_str": null,
  "in_reply_to_screen_name": null,
  "user": {
    "id": 12,
    "id_str": "12",
    "name": "🚶🏽jack",
    "screen_name": "jack",
    "location": "California, USA",
    "description": "",
    "url": null,
    "entities": {
      "description": {
        "urls": []
      }
    },
    "protected": false,
    "followers_count": 3857136,
    "friends_count": 2187,
    "listed_count": 26627,
    "created_at": "Tue Mar 21 20:50:14 +0000 2006",
    "favourites_count": 14534,
    "utc_offset": -25200,
    "time_zone": "Pacific Time (US & Canada)",
    "geo_enabled": true,
    "verified": true,
    "statuses_count": 20315,
    "lang": "en",
    "contributors_enabled": false,
    "is_translator": false,
    "is_translation_enabled": false,
    "profile_background_color": "EBEBEB",
    "profile_background_image_url": "http://abs.twimg.com/images/themes/theme7/bg.gif",
    "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme7/bg.gif",
    "profile_background_tile": false,
    "profile_image_url": "http://pbs.twimg.com/profile_images/768529565966667776/WScYY_cq_normal.jpg",
    "profile_image_url_https": "https://pbs.twimg.com/profile_images/768529565966667776/WScYY_cq_normal.jpg",
    "profile_link_color": "990000",
    "profile_sidebar_border_color": "DFDFDF",
    "profile_sidebar_fill_color": "F3F3F3",
    "profile_text_color": "333333",
    "profile_use_background_image": true,
    "has_extended_profile": true,
    "default_profile": false,
    "default_profile_image": false,
    "following": true,
    "follow_request_sent": false,
    "notifications": false
  },
  "geo": null,
  "coordinates": null,
  "place": null,
  "contributors": null,
  "is_quote_status": false,
  "retweet_count": 92030,
  "favorite_count": 70292,
  "favorited": false,
  "retweeted": false,
  "lang": "en"
}

In the user object, for example, you can find followers_count and statuses_count. In terms of the number of times that status has been retweeted, look for the retweet_count property.

Hope this helps.