skip to Main Content

I’m new to Python and am very confused on how to begin this assignment:

Write Python code to connect to Twitter search API at:

https://api.twitter.com/1.1/search/tweets.json

with at least the following parameters:

q for a search topic of your interest;

count to 100 for 100 records

to retrieve twitter data and assign the data to a variable.

I already created the app to access Twitter’s API. Thanks.

2

Answers


  1. Just as a hint, you might want to use tweepy for this. They have very good documentation and its much easier than trying to reinvent the wheel.

    Login or Signup to reply.
  2. I had this same issue. According to Twitter, you must register an account to even use basic search features of public tweets and there is no way around it. I followed the guide for the complete setup here and can confirm it works

    Edit: the article is for php, but changing it to python shouldn’t be very difficult. It has all the methods outlined in the article

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search