Automated httr authentication with twitteR , provide response to interactive prompt in “batch” mode

后端 未结 3 1258
隐瞒了意图╮
隐瞒了意图╮ 2020-12-03 17:19

I am using the R package twitteR to post items to Twitter. I put everything inside of a function and it works fine. However, I would like to run the function without being

3条回答
  •  一向
    一向 (楼主)
    2020-12-03 18:17

    I don't know much about it.

    But if it's in batch, maybe try this:

    doit <- function() {
        
        # connect to Twitter
        setup_twitter_oauth(api_key, api_secret, access_token, access_token_secret)
        < echo 1
        
    }
    

    Also have you tried posting the 1 outside the function to see if it does the same?

    And maybe it will work if you put the 1 under the snip

    These are just suggestions, cause i don't know very much about the topic, but it might help though.

提交回复
热议问题