fallentech / twitter-ads Goto Github PK
View Code? Open in Web Editor NEWTwitter Ads API for NodeJS
License: MIT License
Twitter Ads API for NodeJS
License: MIT License
Hi,
You've added such a support a while ago, but it seems like the JSON_PATHS is wrong, as it currently contains:
JSON_PATHS: ['tailored_audience_memberships']
This URL does not exist in Twitter Ad API (correct me if I'm wrong).
On the other hand, this endpoint should be sent in JSON:
accounts/:account_id/tailored_audiences/:tailored_audience_id/users
I also think that the condition in line 66 in twitter_ads.js won't meet:
if (constants.JSON_PATHS.indexOf(url) > -1 && ['post', 'put'].indexOf(type) > -1) {
Probably should change to:
if (url.indexOf(constants.JSON_PATHS) > -1 && ['post', 'put'].indexOf(type) > -1) {
Please, advise.
Thanks!
Hello thanks for the great library. However is there are a way to authenticate multiple Twitter accounts using the same application? I've heard from Twitter support that this could be achieved through 3 legged authentication.
There is a new JSON endpoint, that needs to be supported.
POST accounts/:account_id/cards
Please add, thanks in advance
I posted a SO question as well. https://stackoverflow.com/questions/45202177/nodejs-twitter-ads-lib-cannot-find-my-account-account-myaccountnumber-was-not
Any help is appreciated.
I'm assuming there is some difference with accessing via app access tokens?
I am getting Error: TwitterAdsAPI: Twitter TON API returned HTTP status code: 400
every time I attempt to upload my audience file using the T.tonUpload endpoint. I have authenticated with Twitter and successfully used the endpoint T.get('/accounts... with no issues.
Looking at the docs on https://dev.twitter.com/rest/ton it seems like there is suppose to be a 'x-ton-expires'
header, which I tried (see below), but I still get the same error. @talha-asad do you have any ideas?
My Code:
var T = new TwitterAdsAPI({
consumer_key: adApp.consumer_key,
consumer_secret: adApp.consumer_secret,
access_token: adApp.access_token,
access_token_secret: adApp.access_token_secret,
sandbox: false,
api_version: '2'
});
T.tonUpload({
file: dir,
content_type: 'text/plain',
bucket_name: 'ta_partner',
'x-ton-expires': expires
},
function(error, location) {
if (error) return res.serverError(error);
return res.ok(location);
/* If everything goes okay,
you should get something similar to this:
https://ton.twitter.com/1.1/ton/bucket/ta_partner/2892314386/n3UPAcC02roTP6C
*/
});
});
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.