Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help needed for tweepy app #1

Open
Shekharnunia opened this issue Jun 28, 2019 · 5 comments
Open

Help needed for tweepy app #1

Shekharnunia opened this issue Jun 28, 2019 · 5 comments

Comments

@Shekharnunia
Copy link

Hello, @do-n-khanh I saw your contribution and the approach toward the direct message problem in the tweepy app. I need some help regarding the same, I would like to talk more about it if you continue it. I will be waiting for your response

@do-n-khanh
Copy link
Owner

yes, how can i help you?
i only know how to send DM message.
i am not familiar with different things.

@Shekharnunia
Copy link
Author

I want to send messages to anyone who follows me, but there is no direct way to do this, and Twitter also not allow to do user stream, it was supporting it but now links are changed and tweepy not supporting it. Do you have any idea about this

@do-n-khanh
Copy link
Owner

please look at the solution here tweepy/tweepy#1081 (comment)

@Shekharnunia
Copy link
Author

Yes, I used this solution to send a message and the message part is working fine. The problem is in getting information about followers

@saroj1987
Copy link

saroj1987 commented May 10, 2020

@do-n-khanh I am facing issue while reading the direct message using tweepy, the on_direct_message fo Stream, never called when a message reached to the account. could you please help me out on this. these are following info i am using.

python3.7
tweepy is latest installed with tweepy/tweepy#1063

code:
class StdOutListener( StreamListener ):

......
def on_data( self, status ):
print("Entered on_data()")
print(status, flush = True)
return True

def on_direct_message( self, status ):
    print("Entered on_direct_message()")
    try:
        print(status, flush = True)
        return True
    except BaseException as e:
        print("Failed on_direct_message()", str(e))

def on_error( self, status ):
    print(status)

in main:
twitter_stream=Stream(auth,StdOutListener())
print('Stream created...')
twitter_stream.filter(follow=[user.id_str], is_async=True)

NB: persission is Read,Write and direct message. All keys are good. am able connect and also able to read tweets.
could you please help me out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants