Home>

I want to tweet "Tesutotsutoto" on twitter

Error message

-bash: syntax error near unexpected token `" Tesutotsuto ""

Applicable source code

Python

yahoo @ koee: ~ $#Example code for Tweet test yahoo @ koee: ~ $import tweepy -bash: import: command not found yahoo @ koee: ~ $# Specify KEY yahoo @ koee: ~ $CONSUMER_KEY = "*" -bash: CONSUMER_KEY: command not found yahoo @ koee: ~ $CONSUMER_SECRET = "*" -bash: CONSUMER_SECRET: command not found yahoo @ koee: ~ $ACCESS_TOKEN = "*" -bash: ACCESS_TOKEN: command not found yahoo @ koee: ~ $ACCESS_TOKEN_SECRET = "*" -bash: ACCESS_TOKEN_SECRET: command not found yahoo @ koee: ~ $# tweepy settings yahoo @ koee: ~ $auth = tweepy.OAuthHandler (CONSUMER_KEY, CONSUMER_SECRET) -bash: syntax error near unexpected token(' yahoo @ koee: ~ $auth.set_access_token (ACCESS_TOKEN, ACCESS_TOKEN_SECRET) -bash: syntax error near unexpected tokenACCESS_TOKEN, ' yahoo @ koee: ~ $api = tweepy.API (auth) -bash: syntax error near unexpected token(' yahoo @ koee: ~ $#Execute Tweet yahoo @ koee: ~ $api.update_status ("Tesutotsuto") -bash: syntax error near unexpected token"Tesutotsuto" '

What you did

Install tweepy
Get APIKey

  • Answer # 1

    Make that code into a text file and run it on python.

    I'm not doing it right

    [Introduction to Python] Summary of Python code execution methods | CodeCampus