Piroro-hs / react-native-twitter

A Twitter API client library for React Native. Currently not maintained as my main motivation of creating this library was to use the User Streams API.
MIT License
39 stars 20 forks source link

POST request giving Error 220 Your credentials do not allow access to this resource #19

Closed selimonline closed 5 years ago

selimonline commented 6 years ago

Dear,

I want to send direct msg to followers. I have enabled permission in twitter apps management end. Here is my code

const {rest, stream} = twitter(tokens);

        rest.post('direct_messages/new', [{
            screen_name:'username',
            user_id:'2761567848',
            text:'this is test message'
        }]).then(function(data){
            console.log(data);
        });

Error: 220 Your credentials do not allow access to this resource.

can idea pls? Can u give me any working example of post?

EnesBildiren commented 6 years ago

@salimbutex please check your mail box