Search code examples
phptwittertwitter-oauth

How to get Tweets by keyword and hashtag for specific user?(PHP API)


I need to get tweets based on specific keyword and hashtag for a specific user.

for example, if we search "user= @test; hashtag= hiphop". So, any @test tweets will appear in the feed, and any time the hashtag #hiphop is used, those tweets will be pulled in as well.

Thanks.


Solution

  • Tweets from @test containing #hiphop or hipop, using the q parameter :

    from:@test (#hiphop OR hipop)

    (a space is an AND)