简体   繁体   中英

Is it possible to search twitter users by url?

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?

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.

You could make your own web crawler that searches for the www.twitter.com/username link within the HTML source page. For example, search the web for top sites that index under "foobar" in the domain name, then crawl those pages for the code for their twitter button, which contains the username. I have some ideas of how to do this in Python. Mainly just what I've learned for the CS101 course on Udacity.com.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM