Making a Twitter REST API call

This particular example was to get a specific tweet based on the tweet-id

Steps =>

curl — get ‘' — data ‘id=722671647120060417’ — header ‘Authorization: OAuth oauth_consumer_key=”gtRir9XP8ZloZHMWJtEXRq3Ex”, oauth_nonce=”fc6597b20ef6da32cc3d6f3edab2ee42", oauth_signature=”d%2F9G9pdThib6iNXhJU%2BFZuPX7P4%3D”, oauth_signature_method=”HMAC-SHA1", oauth_timestamp=”1461263715", oauth_token=”89265430-GMIwvnHuDwwP3oEPfNHd7Kjkm1m0ZEhsXlsyq1QZz”, oauth_version=”1.0"’ — verbose
  • You could pipe the above command to a JSON parser like so
 — “| python -mjson.tool”
  • Resulting in a JSON with the tweet itself .
  • TO-Do : Parse the above response to extract the Tweet separately
  • Current output —
JSON Output
Show your support

Clapping shows how much you appreciated Abhiram’s story.