2

I’m currently building an meteor app which should make use of the twitter API. Therefor I’m using the mrt:twit meteor package (https://atmospherejs.com/mrt/twit).

I have created an app at https://apps.twitter.com with my twitter account and I’m using my consumer_key, consumer_secret, oauth_access_token and oauth_access_token_secret within the meteor app.

What is working: I can query tweets and access all data available. I can also post tweets.

Whats not working: I cannot delete a tweet. I get this message:

 { [Error: Your credentials do not allow access to this resource]
 message: 'Your credentials do not allow access to this resource',
 statusCode: 403,
 code: 220,
 allErrors:
 [ { message: 'Your credentials do not allow access to this resource',
 code: 220 } ],
 twitterReply: '{"errors":[{"message":"Your credentials do not allow access to this resource","code":220}]}' }

My code looks like this:

'deleteSingleTweet': function(tweet_id) {
 Twit = new TwitMaker({
 consumer_key: consumer_key,
 consumer_secret: consumer_secret,
 access_token: oauth_access_token,
 access_token_secret: oauth_access_token_secret
 });
 const DeleteSingleTweetPromise = new Promise((resolve, reject) => {
 Twit.get(`statuses/destroy/${tweet_id}`, function(err, data, response) {
 if (err) {
 reject(err);
 } else {
 resolve(data);
 }
 });
 });
 DeleteSingleTweetPromise
 .then(data => {
 console.log(data);
 })
 .catch(err => {
 console.log(err);
 });
}

Has anybody an idea what I'm doing wrong here?

asked Jan 27, 2017 at 10:24
4
  • Did you figure this out? Commented Dec 10, 2018 at 20:26
  • Unfortunately not. I paused the small project also and didn’t invest much more time. In the meantime the twitter API changes also. I‘m not sure if this works after all. I guess Twitter doesn‘t want that this works anyway. Commented Dec 12, 2018 at 9:43
  • I did not see it in the documentation. Commented Dec 12, 2018 at 15:32
  • I think the only problem you have here is that you are using Twit.get() when it should be a post. Commented May 20, 2019 at 23:22

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.