Analysis of social networks
Accessing data from social networks, such as LinkedIn, Facebook, or Twitter, used to be much simpler and easier several years ago. Now, most of the APIs have restrictions. Also, the accessing methods are a little bit more involved. First, one has to get authentication (which used to be the case even earlier) and then use methods that access either friends or connections. We have only chosen Twitter for demonstrating the analysis of social network data here, but you can also find other social media data in a similar way.
In order to access Twitter data, as we noticed from the previous chapters (when we discussed word clouds), you have to get authentication keys to access their APIs. There are four keys: CONSUMER_KEY
, CONSUMER_SECRET
, ACCESS_TOKEN_KEYS
, and ACCESS_TOKEN_SECRET
. Once these credentials are verified via Python successfully, you can call GetFriends()
and GetFollowers()
to get the list of friends and followers. There are many packages available in Python...