Home >Backend Development >PHP Tutorial >Harnessing the power of lists: Building with the Twitter API
Twitter Lists allow you to group individual Twitter users and view their tweets individually from your timeline. For example, you could have a list of only your favorite Twitter friends. It helps isolate the signal from the noise and focus on the person you want to pay closer attention to. But lists have countless other uses. You can also share your list publicly or subscribe to other people's lists.
One of the ways to make better use of lists is through the Twitter List API, which gives you complete control over things where the user interface is still cumbersome.
In this two-part tutorial, we'll review useful and innovative uses of lists within the broader Twitter API family. In the next tutorial, we'll dive into coding using the List API to take fuller advantage of these features.
Twitter first launched lists in 2009, but they never became a high priority for the company. In fact, judging by the way they've managed the user interface over the past few years, you might wonder if they want to ditch that feature. Lists remains Twitter's pathetic stepchild - out of sync with their efforts to simplify the interface and make their social network more accessible to the public. Accessing lists through mobile and desktop user interfaces is often difficult and cumbersome.
The fact is that Twitter lists are very useful and powerful, but this functionality is not easily accessible through the Twitter interface. For example, lists are more accessible in third-party apps like TweetDeck than in Twitter's own app:
One of my pet peeves is that Twitter makes it very difficult to add people to lists. There is no bulk account import. You must visit each account page and add them individually:
This is one of the biggest drawbacks to planning and using lists.
There are many ways to use Twitter lists. I've listed some of my favorites below. Please share your suggestions with other readers in the comments.
It’s also helpful to know how some well-known Twitter users use lists. Here's Netscape founder and technology investor Marc Andreesen:
Note how he keeps small lists of sharp and interesting people, as well as topic lists of finance, economics, and news. He also subscribes to other people's lists, such as Scott Kleinberg's Ferguson list.
The following is a list from media guru Brian Stelter:
In most cases, he prefers to subscribe to lists curated by others - and who can blame him, given how difficult this curation UI is?
It's useful to see the lists people have added you to. It can help you understand what topics people think you are an expert on and identify curators who might be worthy of following and engaging with more content.
Here is a summary of the lists I have added as members:
For example, Eric Koester puts a lot of effort into curating his Rad startup list. He probably deserves more attention and engagement.
If I wanted to set up my Twitter profile like Marc Andreesen (you can follow me on Twitter now, by the way), I could look at his listings page and look for popular listings that include him as an expert. I can then identify these curators as people I might engage with on Twitter.
The Twitter list has approximately 19 APIs, divided into three main areas:
Lists allow you to programmatically accomplish tasks that would be difficult to accomplish manually or through the Twitter user interface.
For example, you can add a comma-separated list of Twitter accounts to a list, which is very time-consuming to do through the Twitter user interface.
Or you can convert saved searches in Twitter into curated lists. For example, I can programmatically browse tweets from a saved search for a conference such as World Domination Summit 2014 (hashtag: #WDS2014) and select individual Twitter accounts to add to the list for WDS2014.
Similarly, you can programmatically build a private list of Twitter accounts that negatively mention your corporate brand account or business.
Twitter does not easily expose its local searches through the user interface. However, I can use the API geosearch feature to find tweets close to a GPS location. The result looks like this:
Through the API, we can filter these results to identify Twitter users who are tweeting near my GPS location. If they repeat frequently, we can identify possible nearby residents. We can then programmatically add them to a Twitter list representing Twitter users around my GPS location.
Since it's not easy to check a Twitter list in the Twitter app, we can send a daily email summary of the list's tweets. Alternatively, we could provide a filtered summary that only contains the most popular tweets or tweets from users with higher Klout rankings.
These are some ideas we will explore through code in the next tutorial. Again, please post your suggestions and favorite API scenarios in the comments. I'd love to hear their voices.
Now you know a little bit about how people use Twitter lists and some of their user interface limitations. You also learned some ideas for getting the most out of the Twitter List API. In the next tutorial, we'll walk through building list functionality into the Twitter API.
If you have any questions or suggestions, please ask them in the comments. If you'd like to continue following my future Tuts tutorials and other series, please visit my instructor page or follow @reifman.
The above is the detailed content of Harnessing the power of lists: Building with the Twitter API. For more information, please follow other related articles on the PHP Chinese website!