I am developing an application and I am wondering whether there is any way to search a particular user by the give URL?
basically what I want to do is to find out the relationship between a website and twitter account, say by given domain foobar.com, the code will find out the possible twitter account for this website, say @iamowneroffoobar whose url value has been set as 'http://foobar.com' in twitter.
By checking the twitter API, https://dev.twitter.com/docs/api/1.1/get/users/search I couldn't find any way to do this, but I have already seen this feature been implemented by few other sites, anyone knows how to do this?
For those with access, when you navigate to a user's profile, you'll see a search icon in the top right corner of the screen on the user's profile banner, next to the three-dot menu. Then, you can type in keywords to search the user's tweets.
Twitter's search will let you find almost* all the tweets that contain a particular link. You can just plug in part of the link into search (desktop Twitter's best for this). To view all the tweets choose 'live' from the options and scroll down to go further into the past.
To find tweets containing an url you have to pass the parameter q="url:stackoverflow.com" . Unfortunately you must have an access token to do this call. More info how to use Twitters search operators can be found at https://developer.twitter.com/en/docs/tweets/search/guides/standard-operators.
1 Twitter Search The fastest way to find someone on Twitter if you don't know his Twitter username is to go directly to the Twitter Search page (see Resources for direct link).
I don't have a direct or easy answer but you can try looking for the URL within Twitter pages using Google or Bing's Search API.
This article notes that you can Search for Twitter users based on the words used in their bio profile - site:twitter.com intitle:”on twitter” “bio * sport”*
This will provide you with a long list of people who have used the word sport in their Twitter bio. Again, just alter the search term to suit your own needs.
See if you can adapt this search query to find URL specified in the bio of a Twitter user programmatically.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With