Mining Twitter Data from the Arab Spring

By: Rob Schroeder, Sean Everton, and Russell Shepherd

In this article we draw on social movement theory to help explain how the use of social media, in particular Twitter feeds, may have played a role in the emergence of the Egyptian Arab Spring revolution. More precisely, we suggest that activists' uses of Twitter may have facilitated the framing of grievances in ways that resonated with their target audience. In an examination of a subgroup of primarily Arab-speaking Twitter users, we found that not only did traditional media and activists appear to play a large role in framing the events in Egypt, but so did a fake Twitter account impersonating Egyptian President Hosni Mubarak. This account's tweets attracted a large audience, and may have helped disseminate a portrayal of Mubarak as a corrupt leader who should resign, both of which were goals of the Egyptian revolution.

People often assume that all that is needed for a social movement, an insurgency, or other form of collective action to emerge is for enough individuals to become sufficiently angry about a particular social condition. While grievances are certainly necessary for sustained collective action, they alone are not enough. As social movement scholars have noted, in most societies there are plenty of individuals who are angry with the status quo, but few become activists or engage in contentious politics.1 For a social movement or insurgency to gain traction, other factors need to fall into place.2 In particular, not only do individuals need to harbor grievances of some kind, but:

  1. the grievances have to be framed in such a way that people recognize they share them with others, and believe that together they can do something about them (i.e., insurgent consciousness);
  2. the aggrieved population needs to have access to and be able to appropriate sufficient resources so they do not have to rely on external support (i.e., sufficient mobilizing resources); and
  3. they need to perceive (whether correctly or incorrectly) that the broader socio-political environment is either vulnerable to collective action, or that it represents a significant threat to the group's interests or survival (i.e., expanding opportunities or increased threats). In isolation, none of these factors is sufficient to generate and sustain an insurgency. When they converge and interact, however, collective action becomes a possibility although, we should emphasize, not a certainty.

In this paper we explore how the use of social media, in particular Twitter feeds, may have played a key role during the Egyptian Arab Spring of 2011. We focus on Twitter's role in the framing of grievances, but along the way we also note how it may have been used to attack some of the Egyptian government's vulnerabilities and as a communication network among activists. We begin with an overview of social movement theory, and explain the process of framing.3 We next consider how Twitter functions, and how activists and others used it during the Egyptian Arab Spring. We then examine Twitter data gleaned from the Arab Spring and what it possibly tellsus about its role in the framing process. We conclude with a few thoughts on the role that social media could play in facilitating the development of social movements, insurgencies, and other forms of collective action.

Social Movement Theory

The question of why populations that had appeared quiescent will suddenly rise up against their leaders in protest, riot, and full-blown revolt has intrigued and confounded rulers and researchers alike since long before Niccolò Machiavelli wrote his treatises on benevolent tyranny in the early 16th century. Social movement theory suggests three interrelated causes, each of which is insufficient by itself, but which in combination can fan smoldering resentment into mass revolt: a perceived threat and the opportunity to act, access to resources, and a unifying message. As this section notes, access to new social media may be helping bring these three factors together more quickly and efficiently than ever.

Opportunity and Threat

Disaffected populations generally face numerous obstacles in attempting to mobilize, while opportunities to overcome those obstacles are rare and tend to fluctuate over time. Doug McAdam has suggested that the socio-political environment becomes vulnerable to collective action in three different and interrelated ways:

  1. political instability;
  2. an enhanced political position for the aggrieved population; and
  3. ideological openness.4

Political instability occurs when elite control of the political status quo is weakened by events such as economic crises, armed conflict, large-scale natural disaster, and so on. An increase in the political position (i.e., power) of aggrieved populations can result from broad social changes that occur over extended periods. Finally, social change can lead the wider population to tolerate alternative and sometimes even subversive ideas championed by the aggrieved population.5 More recently, scholars have noted that expanding political opportunities are more likely to be a factor in democratic societies, while in autocratic societies it is often substantial threats to a group's interests or survival that matter.6 Drawing on Daniel Kahneman and Amos Tversky's observation that individuals are especially adverse to loss,7 many scholars argue that groups will risk far more to preserve what they have than on what they might gain.8

Whether it is the expansion of opportunities or an increase in threats, neither will lead to collective action unless groups perceive them as such.9 An established political order can be reeling, but if no group notices this, it is unlikely that any will take advantage of the situation to bring about change. Similarly, if a group does not recognize that its interests or its very existence are threatened, then it may not act in time to avert its own destruction.

Mobilizing Resources

Favorable and/or threatening changes in the political environment only increase the probability that nascent insurgencies will mobilize. Whether they actually do also depends on whether they have access to and are able to appropriate the resources necessary to mobilize and sustain their cause.10 Another enabling factor is access to a network of pre-existing organizations (formal and informal) that can provide the institutional foundation on which to build a movement. These also help link people to activists, form and sustain the moral outrage that feeds insurgencies, and facilitate mobilization and deployment for insurgent activities.11 Along with fostering a sense of solidarity, networks can also contribute other key resources, such as the ability to monitor participants (the latter is especially important when defection poses serious security issues to insurgencies), leaders, and communications.12 One other resource that incipient movements often need is "free spaces" (e.g., coffee houses, religious institutions, neighborhood bars, ungoverned spaces) that are beyond the surveillance and control of authorities, and where groups can frame the narratives (e.g., "We shall overcome.") that accompany successful mobilization efforts.13

Insurgent Consciousness

As noted at the outset, discontent by itself does not produce social movements and insurgencies; there needs to be what Christian Smith calls "the development of an insurgent consciousness," which occurs when the social situation is framed in such a way that people feel compelled to mobilize.14 A budding social movement, however, cannot expect that all potential members will be able to grasp fully the group's ideology. Thus, movement elites generally frame their group's core message in generalized ideological snippets, much like bumper stickers,15 that are easily communicated to their target audience.16 Given the 140-character limitation of Twitter messages (see discussion below), Twitter appears to be an ideal tool for broadcasting ideological snippets and framing grievances for delivery to a social movement's target audience.

Twitter and the Arab Spring

Twitter is a micro-blogging tool that enables users to send and receive text-based, publicly available posts of up to 140 characters known as "tweets," which can contain messages, images, and links to internet sites. In addition to broadcasting tweets to others, users can choose to follow other users, so that they are constantly updated with new information when those they follow "tweet." They can also describe the topic of their tweet by placing a "#" before a word. If they want to pass on another person's message, they can "retweet" that message to their own followers or other users. Retweets contain the original message along with the original tweeter's name, but they can be passed on to other users with additional content if the retweeting user so desires.

During the 2011 Egyptian protests, many users posted messages, images, and links to other web pages about what was occurring through Twitter. These helped to create a global conversation about events in Egypt. Some struck a chord and were retweeted thousands of times, while others did not reach large audiences.

In order to understand which users were significant conduits of information during this time, we analyzed over one million tweets about Egypt from two days, January 28 and February 4, 2011, that we downloaded using a research tool on the Twitter API (Application Programming Interface).17 The Twitter API offers various tools that allow other programs to receive data from and send data to Twitter. We used a program to request from Twitter all publicly available data it could find in regards to users tweeting about Egypt; the program then organized and stored that data. The key aspects of the data that were stored included the user's Twitter name, the content of each tweet, and a description of each user (from the user's public profile). Using these data, we generated a user-by-user network where a direct tie was drawn between two users if one of the users sent a message to the other, or a user retweeted the message of another. In the case of the latter, we drew a tie from the author of the original message to the user who "retweeted" the message. In the end, our user-by-user network included 196,670 users with 526,976 ties between them. Figure 1 presents a visualization of the network.

The size of the network we traced makes the application of some standard social network-analysis algorithms difficult to implement (because many are computer intensive) and the results of others potentially open to misinterpretation. For example, in terms of degree centrality, which is a count of each user's ties, the celebrity singer Katy Perry ranks in the top ten in our database. While it is possible that Perry's tweets helped frame the grievances of Egyptians, it is unlikely that they did.

In order to filter out noise such as this, we used an algorithm developed by a group of statisticians to identify distinct clusters (or communities) within the network.19 This algorithm assigns users to different clusters based on a partition of users that yields the highest modularity score. Modularity is a measure of fit that compares the ties within and across clusters to what one would expect in a random graph of the same size and having the same number of ties.20 Formally, it is the fraction of internal ties in each cluster less the expected fraction if they were distributed at random across the network. The higher the net fraction, the better the fit. The algorithm identified a number of distinct clusters in our data. Here, we focus on the cluster that included Al Arabiya and Al-Jazeera Arabic, because most of the users speak Arabic and are probably geographically close to the events in Egypt.

Analysis and Findings

The Al Arabiya and Al-Jazeera Arabic cluster is a far smaller subset (8,460 users, 14,391 ties—see Figure 2) of our entire database, and thus more amenable to the use of most social network analysis algorithms. We began by estimating "betweenness centrality,"21 which measures the extent to which each actor in a network lies on the shortest paths (i.e., geodesics) connecting all pairs of actors in the network. It is often used as a measure of brokerage; here we use it to identify users who are potential conduits of information in the network. In Figure 2, the size of each node reflects that user's betweenness centrality score.

Al Arabiya and Al-Jazeera Arabic rank third and fourth respectively in terms of betweenness centrality. This is unsurprising since both are traditional "go to" sources of news and information, and we would expect them to be conduits of information about the Egyptian revolution. The Saudi user "Essamz" ranks second highest in betweenness centrality. This also was not a surprise to us because he (Essam Al-Zamil) portrays himself as an activist who uses Twitter to start open conversations. Al-Zamil in fact recently created a new Twitter venture called Radwitter, which is a radio show that broadcasts about Saudi events and issues brought up on Twitter. The program's goal is to facilitate discussion on the radio between activists and others who use Twitter.22 Interestingly, the user who ranks highest in terms of betweenness centrality is a parody account ("HosniMobarak") where the user poses as Hosni Mubarak, the president of Egypt who was overthrown in the course of the revolution. According to the user's profile, he (or she) is located somewhere near or in Cairo, and the majority of the account's tweets during the two days we studied were in English. A few examples appear below:

"I'll be on TV soon to announce the new changes. First thing will be the replacement of the current people of #Egypt."

"I survived 83 years, 6 assassination attempts, 2 major wars, and 2 major revolutions. What makes you think I won't survive this? #Egypt"

"Fool you once, shame on me. Fool you for 30 years, shame on you, your children, and your grandchildren. #Egypt"

"#Irony: Using the Internet, that I blocked earlier, I hereby announce my resignation as "President" of #Egypt."

"Like I said in my TV statement, I will deliver the reforms I promised, I just didn't say when. #Egypt"

"They say that what goes up must come down. But then again, I've defied every law there is. #Egypt"

It is interesting that while most of the fake Hosni Mubarak's tweets were in English, the clustering algorithm we used still assigned him to a predominantly Arab-speaking cluster, indicating that in spite of the potential language barrier, his tweets received substantial airplay within a largely Arabic-speaking community. This suggests that his parody of the Egyptian president may have helped frame Mubarak as a corrupt and incompetent leader. This portrayal, conveyed with sharp humor, spread widely across the "Twitterverse," with individuals from the Arabic-speaking community, the Netherlands, and elsewhere around the world retweeting his messages. The active spread of this negative imaging from individual to individual fits with social movement theory's requirement for social consciousness to embrace common grievances. Of course, it is possible that many Egyptians already perceived their president in this way. If that was the case, then the fake account's tweets would likely have reinforced the public's perception of Mubarak, and were taking advantage of an existing political opportunity by attacking one of the regime's vulnerabilities. In addition, when individuals posted tweets about the real Hosni Mubarak, they often included a link to the parody account, thereby directing even more attention to it. In either case, theory suggests that the widespread sharing of a common viewpoint among a largely educated, middle-class population with access to resources may have contributed to people's sense that the moment for change (opportunity) had come.

To be clear, we are not suggesting that the fake Hosni Mubarak caused the events in Egypt to occur. As our earlier discussion of social movement theory should have made clear, a number of factors need to fall into place in order for a group of aggrieved individuals to mobilize, and even then there is no guarantee that they will. Nevertheless, our analysis does suggest that the parody's tweets may have played a role in influencing the public's perception of the president and thus given a boost to the movement. Without additional data we cannot prove that this in fact happened. The results of our analysis, however, are consistent with such a deduction.


In this article, we have examined how social movements may be able to use Twitter to frame grievances in ways that resonate with their target audience. We saw how during the Egyptian Revolution, thousands of people used Twitter to discuss the events that were taking place. Using a clustering algorithm, we identified and focused on a particular cluster of Twitter users, the one that included the news organizations Al Jazeera Arabic and Al Arabiya. Using betweenness centrality to identify potentially influential nodes within this cluster, we discovered that a Hosni Mubarak parody account was quite central, and speculated that its tweets may have been influential in the framing of grievances during the Egyptian Revolution. By portraying the real Hosni Mubarak as corrupt and unwilling to give up power, it may have helped create or further a negative public perception of the Egyptian president.

This is not the only example of fake accounts that apparently tried to influence unfolding events during the Egyptian Revolution or elsewhere in the world. For example, during the Egyptian Revolution a fake Henry Kissinger (the former U.S. secretary of state) tweeted regularly, and attempted to portray Kissinger as a war criminal (e.g., his profile location displayed as "Anywhere but the Hague," a reference to the location of the International Criminal Court and the International Court of Justice). Interestingly, this fake account often retweeted messages from the fake "HosniMobarak" account. Another example is the fake FARC (Revolutionary Armed Forces of Colombia) account ("FARC"). The FARC is a Colombian guerilla movement that was originally founded in 1964 to protect rural peasants against the harsh policies of large landowners, and provide the poor with education in exchange for food and supplies. It has since devolved into an international organization that now controls Colombia's drug trade and often wreaks violence against the peasants it claims to protect.23 While the FARC has its own Twitter account ("FARC_Colombia"), the fake FARC account tweets about government victories against the FARC and atrocities committed by the FARC.

We should note that Twitter has a policy regarding parody accounts and impersonation accounts. It allows parody accounts as long as they make clear that they are a parody. Impersonation accounts, however, are not allowed. In fact, the "Henry_Kissinger" account discussed above has had to remove all of its tweets because it was deemed an impersonation rather than a parody account.24 While this policy will place limits on the long-term viability of impersonation accounts, they will most likely continue to spring up, and along with parody accounts, will help frame how others perceive various events around the world. Moreover, social movements, insurgencies, and other forms of collective action will almost certainly continue to use Twitter as a means of communicating with the faithful.

About the Author(s):

Rob Schroeder is a Research Associate in the Department of Defense Analysis (DA) CORE Lab at the U.S. Naval Postgraduate School (NPS). He earned a M.A. in International Policy with a focus on Conflict Resolution at the Monterey Institute of International Studies (MIIS, 2011) and a B.A. in International Relations at Boston University (2008). He is researching how to use open source information to understand and map the Syrian opposition, and how different types of external support to insurgencies relate to length of conflicts and the ways they end. Rob also helped train members of the Joint Special Operations Task Force—Philippines to collect and analyze relational information using social network analysis.

Sean Everton is an Assistant Professor in the DA Dept. and the co-Director of the NPS CORE Lab. Prior to joining NPS in 2007 he was an adjunct professor at both Santa Clara University and Stanford University. Professor Everton earned his M.A. and Ph.D. in Sociology at Stanford University (2007). He has published articles in the areas of social network analysis, sociology of religion, economic sociology, and political sociology. He recently published a monograph for Cambridge University Press on using social network analysis for the crafting of strategies for the disruption of dark (i.e., criminal and terrorist) networks.

Russell Shepherd graduated with a M.A. degree in International Policy Studies from MIIS (2012), where he focused on economic and public policy analysis. His research used open-source technology to create innovative approaches to modern data analysis, including social networks, statistics and economics. While working at the NPS CORE Lab (2011–2012), Russ developed methods for the analysis of unconventional data, including generating social networks from Twitter.


1. John D. McCarthy and Mayer N. Zald, "Resource Mobilization and Social Movements: A Partial Theory," American Journal of Sociology 82 (1977): 1212–41.

2. Doug McAdam, Sidney Tarrow, and Charles Tilly, Dynamics of Contention (New York and Cambridge: Cambridge University Press, 2001).

3. David A. Snow and Robert D. Benford, "Ideology, Frame Resonance, and Participant Mobilization," International Social Movement Research 1 (1988): 197–217.

4. Doug McAdam, Political Process and the Development of Black Insurgency, 1930–1970 (Chicago: University of Chicago Press, 1982).

5. Christian S. Smith, The Emergence of Liberation Theology: Radical Religion and Social Movement Theory (Chicago: University of Chicago Press, 1991), 59.

6. David A. Snow, Daniel M. Cress, Liam Downey, and Andrew W. Jones, "Disrupting the ‘Quotidian:' Reconceptualizing the Relationship between Breakdown and the Emergence of Collective Action," Mobilization: An International Journal 3 (1998): 1–22.

7. See Daniel Kahneman and Amos Tversky, "Prospect Theory: An Analysis of Decision under Risk," Econometrica 47 (1979): 263–91; and Amos Tversky and Daniel Kahneman, "The Framing of Decisions and the Psychology of Choice," Science 211 (1981): 453–58.

8. Jack A. Goldstone and Charles Tilly, "Threat (and Opportunity): Popular Action and State Response in the Dynamics of Contentious Action," in Silence and Voice in the Study of Contentious Politics, Ronald R. Aminzade, Jack A. Goldstone, Doug McAdam, Elizabeth J. Perry, William H. Sewell, Jr., Sidnew Tarrow, and Charles Tilly, eds. (New York and Cambridge: Cambridge University Press, 2001), 179–94.

9. McAdam, Tarrow, and Tilly, Dynamics of Contention.

10. McCarthy and Zald, "Resource Mobilization and Social Movements:" 1212–41.

11. Christian S. Smith, Resisting Reagan: The U.S. Central America Peace Movement (Chicago: University of Chicago Press, 1996).

12. See McAdam, Political Process; and Smith, The Emergence of Liberation Theology. Social media such as Facebook and Twitter can obviously facilitate communication between activists. This aspect of social media's role in helping give birth to various forms of collective action, however, is not the focus of this paper.

13. Doug McAdam and David A. Snow, "Facilitative Spaces and Contexts," in Readings on Social Movements: Origins, Dynamics, and Outcomes, Doug McAdam and David A. Snow, eds. (New York and Oxford: Oxford University Press, 2010), 187–88.

14. Smith, The Emergence of Liberation Theology, 61.

15. Glenn E. Robinson, "Hamas as Social Movement," in Islamic Activism: A Social Movement Theory Approach, Quintan Wiktorowicz, ed. (Bloomington: Indiana University Press, 2004), 129.

16. David A. Snow, E. Burke Rochford, Jr., Steven K. Worden, and Robert D. Benford, "Frame Alignment Processes, Micromobilization, and Movement Participation," American Sociological Review 51 (1986): 464–81.

17. For information about Twitter API, see

18. The green community at the bottom of the graph is the one we focus on. Another community of interest centered around a language is the purplish-pink community that extends from the center of the graph to the 4 o'clock position. This one is largely made up of Chinese speakers with some individuals speaking about a possible "jade" revolution. This does not, however, mean that each community is based around languages. Other communities tend to be focused around certain news organizations, such as CNN, or those following a celebrity.

19. Vincent D. Blondel, Jean-Loup Guillaume, Renaud Lambiotte, and Etienne Lefebvre, "Fast Unfolding of Communities in Large Networks," Journal of Statistical Mechanics P10008 (2008).

20. Mark E. J. Newman, "Modularity and Community Structure in Networks," Proceedings of the National Academy of Sciences 103 (2006): 8577–82.

21. Linton C. Freeman, "Centrality in Social Networks I: Conceptual Clarification," Social Networks 1 (1979): 215–39.

22. Mariam Abdallah, "Saudi Arabia: Boycotting Twitter to Save It," Al Akhbar English, January 31, 2012:; accessed on October 5, 2012.

23. Claire Metelits, Inside Insurgency: Violence, Civilians, and Revolutionary Group Behavior (New York and London: New York University Press, 2010).

24. For more information on Twitter's parody and impersonation policies see: