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

"search" method return empty statuses[] for some hashtags #38

Open
JHSPHshe opened this issue Apr 20, 2022 · 3 comments
Open

"search" method return empty statuses[] for some hashtags #38

JHSPHshe opened this issue Apr 20, 2022 · 3 comments

Comments

@JHSPHshe
Copy link

the hashtags like ##SJWYF2022, #TwitterLearnIn

image

Any Idea will be appreciated. Thanks.

@coldfumonkeh
Copy link
Owner

Hi @JHSPHshe . Please can you post an example of the method call you are using and the arguments you are sending to it?

@coldfumonkeh
Copy link
Owner

@JHSPHshe Actually it looks like you're sending the wrong value through for the search q parameter.
I think it should be urlDecode('%23SJWYF2022')

var dataReturn = variables.monkehTweet.search(q=urlDecode('%23SJWYF2022'), count='2', format='json');

@JHSPHshe
Copy link
Author

Hi Matt,

Thank you for your response.

The search function indicated that
<cfargument name="q" required="true" type="String" hint="Search query. Should be URL encoded. Queries will be limited by complexity." />

So when I query our db, get the hashtag '#SJWYF2022', I assign this hashtag to searhstrRep, then I do

<cfset searchStrEncoded = URLEncodedFormat(searhstrRep) />

then call search function in script
returnData = application.objMonkehTweet.search(q=searchStrEncoded,result_type=searchType,count=searchCount);

The returnData contain status which is empty array

image

I user your recommend code above, got the same result;
image

My question is, the search function works for most of hashtag, like #publicHealth , #TheNorthman, #EverythingEverywhereAllAtOnce, etc, but one of our faculty member report recently, when they search this #SJWYF2022 (which has only few post , and all of them on Mar 31), not return anything. Is it possible anything wrong on twitter.com side?

Thanks again for your help. very appreciated.

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

2 participants