Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have hooked up my Twitter account to Mathematica and I have 1468 followers

myfollowers = Length[SocialMediaData["Twitter", "Followers"]]

1468

I wondered what my follower network would look like but the returned graph was far too simple looking:

a = SocialMediaData["Twitter", "FollowerNetwork"]

enter image description here

The graph only has 32 vertices:

VertexCount[a]

Looking at the names of the Twitter users it has included, it seems that it has only considered the most recent people who have followed me.

So, how do I get Mathematica to consider all of my followers?

share|improve this question
    
Unrelated to your question, but could you check if you can access another account's public follower list if you authorize the app? –  rm -rf Dec 1 '12 at 14:05
    
Yes I can. Interestingly, this is limited too. For example hugelist = SocialMediaData[{"Twitter", "stephenfry"}, "Friends"] returns a list that is only 5000 followers long. However, Mr Stephen Fry has over 5,000,000 followers! Limitations on the Twitter API perhaps? –  WalkingRandomly Dec 1 '12 at 14:52
    
I don't know if this is the answer or not but, when applying SocialMediaData to Facebook, a similar thing happens, i.e. the vertex count of my Friends Network is strictly smaller than my number of Friends. In that context, I believe the reason has to do with my friends privacy settings which doesn't necessarily allow me to friends' friends. –  Mark McClure Dec 1 '12 at 17:46
    
Sounds reasonable for Facebook. Not so for Twitter. Only a tiny fraction of my followers would have a locked account. –  WalkingRandomly Dec 1 '12 at 17:56

1 Answer 1

up vote 4 down vote accepted

To honor Twitter rate limits, "FollowerNetwork" property gives a subgraph of the follower network.

https://dev.twitter.com/docs/rate-limiting/1.1

You can build the full follower network (at your own risk):

With[{followers = SocialMediaData["Twitter", "Followers"], 
mutual = Complement[Intersection[
                    SocialMediaData[{"Twitter", #1}, "Followers"], #2], {#1}] &}, 
Quiet[Graph[Flatten[Table[Thread[f -> mutual[f, followers]], {f, followers}]]]]]
share|improve this answer
1  
Thanks for that. Killed my kernel. Perhaps I am asking for too much all in one go. So, I wonder how best to build this up a piece at a time so that I don't hit the rate limit? Would also be fun to watch the graph build up slowly. –  WalkingRandomly Dec 1 '12 at 21:21
    
@WalkingRandomly Maybe what hangs is the graphical output? 1468 is a a lot to plot. Can you try g = ... ; to suppress graphical output. And then see if you can work with properties like EdgeList[g]//Length - which i bet is a huge number. BTW - great blog you have - I enjoy reading it. –  Vitaliy Kaurov Dec 2 '12 at 0:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.