Coder Social home page Coder Social logo

Comments (6)

sixohsix avatar sixohsix commented on August 16, 2024

When using search.twitter.com you have to set the api_version to None. However, I will fix this common pitfall in 1.6.1.

from twitter.

edglazer avatar edglazer commented on August 16, 2024

I am still having this problem. I have tried it with and without setting the api_version to None - neither seems to work. Any thoughts on why this might be?

from twitter.

EugeneLiang avatar EugeneLiang commented on August 16, 2024

hmm, are u using version 1.6.1? If not, try using the latest version ( version 1.6.1 ).

Else you can try to set api_version="" # an empty string

It worked for me.

You can read this blog post : http://www.liangeugene.com/2011/04/error-with-twitter-package-by-sixohsix-and-its-solution/

Best.

from twitter.

edglazer avatar edglazer commented on August 16, 2024

Still having the problem, (under version 1.6.1) but I'm specifically searching for trends, so I might be commenting in the wrong place. I tried the suggestions above without luck, but thank you for sharing them.

Incidentally, the code I tried was:

import twitter
twitter_search = twitter.Twitter(domain='search.twitter.com', api_version='')
trends = twitter_search.trends()

But I'll stop spamming this thread, as it is my suspicion that the resulting error has to do with a twitter change in how trends are handled through the API, and may require a separate issue to be opened.
Thanks!

from twitter.

sixohsix avatar sixohsix commented on August 16, 2024

According to the Twitter documentation, trends are accessed via api.twitter.com, NOT search.twitter.com.

http://dev.twitter.com/doc/get/trends

import twitter 
twitter = twitter.Twitter()
trends = twitter.trends()

from twitter.

BENGMN avatar BENGMN commented on August 16, 2024

This code comes from the O'Reilly erratum and is verified to be functional

import twitter
twitter_api = twitter.Twitter(domain='api.twitter.com', api_version='1')
trends = twitter_api.trends()

from twitter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.