Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about trends/places api #323

Open
chorlick opened this issue May 2, 2019 · 0 comments
Open

Question about trends/places api #323

chorlick opened this issue May 2, 2019 · 0 comments

Comments

@chorlick
Copy link

chorlick commented May 2, 2019

Working with this package and having an issue getting the trends/place api working

tp.getCurrentTrendingTopics(2428184);


getCurrentTrendingTopics(woeid) {
        var client = new Twitter({
            consumer_key: '',
            consumer_secret: '',
            access_token_key: '',
            access_token_secret: ''
        });

        client.get("trends/place?id=" + woeid, function (error, tweets, response) {
            if (error) {
                throw error;
            }
            console.log(response.body)
        });
    }

Pretty simple but Im constantly getting a 403 error back from twitter. I have valid application credentials. I am able to query my own rate limit data and hit the other /trends api endpoints successfully. Below is the console.

C:\Users\\code\twitter_peel\src\twitter-peel.js:42
                throw error;
                ^

Error: HTTP Error: 403 Forbidden
    at Request._callback (C:\Users\\code\twitter_peel\node_modules\twitter\lib\twitter.js:221:9)
    at Request.self.callback (C:\Users\\code\twitter_peel\node_modules\request\request.js:185:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (C:\Users\\code\twitter_peel\node_modules\request\request.js:1161:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (C:\Users\\code\twitter_peel\node_modules\request\request.js:1083:12)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:111:20)

Im new to the twitter api so Im not sure if i have a actual auth issue or something else. Anyone else having any issues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant