SocialMediaData["name"]
gives information about the social media entity "name".
SocialMediaData["name","property"]
gives the value of the specified property for the social media entity "name".
SocialMediaData[{"name",id},"property"]
gives the value of a property for the specified identifier id.
SocialMediaData
SocialMediaData["name"]
gives information about the social media entity "name".
SocialMediaData["name","property"]
gives the value of the specified property for the social media entity "name".
SocialMediaData[{"name",id},"property"]
gives the value of a property for the specified identifier id.
Details
- Social media entities can be specified by standard names such as "Facebook" and "Twitter".
- SocialMediaData[] gives a list of all available social media sites including "Facebook", "Instagram", "Twitter", and "LinkedIn".
- SocialMediaData["name","Properties"] gives a list of properties available for the social media "name".
- Facebook-related properties include:
-
"Friends" list of friends "FriendIDs" list of friend IDs "UserData" user data "Posts" post data "Feeds" feed data - Facebook user-related networks, with vertices corresponding to users, include:
-
"FriendNetwork"
is connected to user
if
and
are friends"LikeCommentNetwork"
is connected to
if
and
like or comment on the same post "LikeNetwork"
is connected to
if
and
like the same post"CommentNetwork"
is connected to
if
and
comment on the same post - Facebook post-related networks, with vertices corresponding to posts, include:
-
"PostLikeCommentNetwork" a user likes or comments on both posts
and 
"PostLikeNetwork" a user likes both posts
and 
"PostCommentNetwork" a user comments on both posts
and 
- Facebook bimodal-related networks include:
-
"BimodalLikeCommentNetwork" network with users connected to their likes and comments "BimodalLikeNetwork" user-like network with users connected to their likes "BimodalCommentNetwork" user-comment network with user connected to their comments - Twitter-related properties include:
-
"Followers" list of followers "FollowerIDs" list of follower IDs "Friends" list of friends "FriendIDs" list of friend IDs "UserData" user data - Twitter follower-related networks, with vertices corresponding to followers, include:
-
"FollowerNetwork" user
is connected to user
if
is a follower of 
"FollowerReplyToNetwork" user
is connected to user
if
replies to 
"FollowerMentionNetwork" user
is connected to user
if
mentions 
- Twitter friend-related networks, with vertices corresponding to friends, include:
-
"FriendNetwork" user
is connected to user
if
is a friend of 
"FriendReplyToNetwork" user
is connected to user
if
replies to 
"FriendMentionNetwork" user
is connected to user
if
mentions 
- Search topic-related networks, with vertices corresponding to users of tweets that match a query, include:
-
"SearchNetwork" user
is connected to
if
is a follower of 
"SearchReplyToNetwork" user
is connected to user
if
replies to 
"SearchMentionNetwork" user
is connected to user
if
mentions 
- SocialMediaData["name","property","ann"] gives various annotations associated with a property. Typical annotations include:
-
"Description" textual description of the property "Information" hyperlink to additional information "Data" raw data "FormattedData" formatted data - SocialMediaData provides gateways to external social media data sites. Its uses are subject to any restrictions associated with those sites, and may require additional licensing.
Examples
open all close allBasic Examples (2)
SocialMediaData["Facebook", "Friends"]//ShortSocialMediaData["Facebook", "FriendNetwork"]SocialMediaData["Twitter", "Followers"]//ShortSocialMediaData["Twitter", "FollowerNetwork"]Scope (72)
Facebook (33)
Basic (8)
SocialMediaData["Facebook"]Get a list of possible properties:
SocialMediaData["Facebook", "Properties"]SocialMediaData["Facebook", "Friends"]//ShortSocialMediaData["Facebook", "Feeds"]//ShortSocialMediaData[{"Facebook", "123456789"}, "Feeds"]//ShortSocialMediaData[{"Facebook", "Facebook"}, "Feeds"]//ShortGet the textual description of a property:
SocialMediaData["Facebook", "Friends", "Description"]SocialMediaData["Facebook", "Friends", "Information"]Get the user-post network linked by likes or comments:
SocialMediaData["Facebook", "BimodalLikeCommentNetwork" ]SocialMediaData[{"Facebook", "1234567"}, "BimodalLikeCommentNetwork" ]Get the user-post network linked by likes:
SocialMediaData["Facebook", "BimodalLikeNetwork" ]User-post network of a specified user:
SocialMediaData[{"Facebook", "1234567"}, "BimodalLikeNetwork" ]Get the user-post network linked by comments:
SocialMediaData["Facebook", "BimodalCommentNetwork"]SocialMediaData[{"Facebook", "1234567"}, "BimodalCommentNetwork" ]Users (7)
SocialMediaData["Facebook", "Friends"]//ShortSocialMediaData["Facebook", "FriendIDs"]//ShortSocialMediaData["Facebook", "UserData"]//ShortSocialMediaData[{"Facebook", "1234567"}, "UserData"]//ShortSocialMediaData["Facebook", "Picture"]SocialMediaData[{"Facebook", "1234567"}, "Picture"]SocialMediaData["Facebook", "FriendNetwork"]Get the user network linked by commenting on or liking the same post:
SocialMediaData["Facebook", "LikeCommentNetwork"]User like-comment network of a user:
SocialMediaData[{"Facebook", "1234567"}, "LikeCommentNetwork" ]Get the user network linked by liking the same post:
SocialMediaData["Facebook", "LikeNetwork"]SocialMediaData[{"Facebook", "1234567"}, "LikeNetwork" ]Get the user network linked by commenting on the same post:
SocialMediaData["Facebook", "CommentNetwork"]User-comment network of a user:
SocialMediaData[{"Facebook", "1234567"}, "CommentNetwork" ]Page (4)
Get a profile picture of a page:
SocialMediaData[{"Facebook", {"Page", "OfficialWolframAlpha"}}]SocialMediaData[{"Facebook", {"Page", "OfficialWolframAlpha"}}, "PageID"]SocialMediaData[{"Facebook", {"Page", "OfficialWolframAlpha"}}, "Category"]SocialMediaData[{"Facebook", {"Page", "OfficialWolframAlpha"}}, "Link"]SocialMediaData[{"Facebook", {"Page", "OfficialWolframAlpha"}}, "Location"]SocialMediaData[{"Facebook", {"Page", "OfficialWolframAlpha"}}, "Phone"]SocialMediaData[{"Facebook", {"Page", "OfficialWolframAlpha"}}, "Website"]SocialMediaData[{"Facebook", {"Page", "OfficialWolframAlpha"}}, "UserData"]//ShortSocialMediaData[{"Facebook", {"Page", "OfficialWolframAlpha"}}, "LikeCount"]The number of people talking about a page:
SocialMediaData[{"Facebook", {"Page", "OfficialWolframAlpha"}}, "TalkingAboutCount"]Posts (4)
SocialMediaData["Facebook", "Posts"]//ShortSocialMediaData[{"Facebook", "1234567"}, "Posts"]//ShortSocialMediaData[{"Facebook", {"Page", "OfficialWolframAlpha"}}, "Posts"]//ShortGet the post network linked by sharing likers or commenters:
SocialMediaData["Facebook", "PostLikeCommentNetwork"]Post the like-comment network of a user:
SocialMediaData[{"Facebook", "1234567"}, "PostLikeCommentNetwork" ]Get the post network linked by sharing likers:
SocialMediaData["Facebook", "PostLikeNetwork"]Post the like network of a user:
SocialMediaData[{"Facebook", "1234567"}, "PostLikeNetwork" ]Get the post network linked by sharing commenters:
SocialMediaData["Facebook", "PostCommentNetwork"]Post the comment network of a user:
SocialMediaData[{"Facebook", "1234567"}, "PostCommentNetwork" ]Analysis (10)
Show the recent history of a user's activities:
SocialMediaData["Facebook", "ActivityRecentHistory"]SocialMediaData["Facebook", "ActivityRecentHistory", "FormattedData"]Show the recent user's activities:
SocialMediaData["Facebook", "ActivityTypes"]SocialMediaData["Facebook", "ActivityTypes", "FormattedData"]Show the weekly distribution of the user's activities:
SocialMediaData["Facebook", "ActivityWeeklyDistribution"]SocialMediaData["Facebook", "ActivityWeeklyDistribution", "FormattedData"]SocialMediaData["Facebook", "WallPostStatistics"]SocialMediaData["Facebook", "WallPostStatistics", "FormattedData"]Show wall posts' character lengths by months:
SocialMediaData["Facebook", "WallPostLength"]SocialMediaData["Facebook", "WallPostLength", "FormattedData"]SocialMediaData["Facebook", "WallWordFrequencies"]//ShortSocialMediaData["Facebook", "WallMostLikedPost"]//ShortSocialMediaData["Facebook", "WallMostLikedPost", "FormattedData"]Show the most-commented posts:
SocialMediaData["Facebook", "WallMostCommentedPost"]//ShortSocialMediaData["Facebook", "WallMostCommentedPost", "FormattedData"]SocialMediaData["Facebook", "WallTopCommenter"]Show the weekly application activities:
SocialMediaData["Facebook", "WallWeeklyAppActivity"]SocialMediaData["Facebook", "WallWeeklyAppActivity", "FormattedData"]Instagram (17)
Basic (6)
SocialMediaData["Instagram"]Get a list of possible properties:
SocialMediaData["Instagram", "Properties"]SocialMediaData["Instagram", "Followers"]//ShortGet the textual description of a property:
SocialMediaData["Instagram", "FollowerIDs", "Description"]SocialMediaData["Instagram", "FollowerIDs", "Information"]Get a list of the most popular media at the moment:
SocialMediaData["Instagram", "PopularMedia"]SocialMediaData["Instagram", "PopularMediaIDs"]//ShortGet a list of the most recent media of the user:
SocialMediaData["Instagram", "LatestMedia"]SocialMediaData["Instagram", "LatestMediaIDs"]//ShortUser (5)
SocialMediaData["Instagram", "Followers"]//ShortSocialMediaData["Instagram", "FollowerIDs"]//ShortSocialMediaData[{"Instagram", "1287996"}, "Followers"]//ShortSocialMediaData["Instagram", "Followings"]//ShortSocialMediaData["Instagram", "FollowingIDs"]//ShortSocialMediaData[{"Instagram", "1287996"}, "Followings"]//ShortSocialMediaData["Instagram", "UserData"]SocialMediaData[{"Instagram", "1287996"}, "UserData"]Get a list of published media:
SocialMediaData["Instagram", "Media"]//ShortSocialMediaData["Instagram", "MediaIDs"]//ShortGet a list of published media of a user:
SocialMediaData[{"Instagram", "1287996" }, "Media"]//ShortGet a list of media the user liked:
SocialMediaData["Instagram", "Liked"]//ShortSocialMediaData["Instagram", "LikedIDs"]//ShortMedia (6)
SocialMediaData[{"Instagram", {"Media", "215290905357113060_1287996"}}]SocialMediaData[{"Instagram", {"Media", "368809902030501891_199112861"}}, "Type"]SocialMediaData[{"Instagram", {"Media", "368809902030501891_199112861"}}, "MediaID"]SocialMediaData[{"Instagram", {"Media", "368809902030501891_199112861"}}, "Link"]SocialMediaData[{"Instagram", {"Media", "368809902030501891_199112861"}}, "Location"]SocialMediaData[{"Instagram", {"Media", "368809902030501891_199112861"}}, "CreationDate"]Get media standard-resolution image:
SocialMediaData[{"Instagram", {"Media", "359501115230705584_1287996"}}, "Image"]SocialMediaData[{"Instagram", {"Media", "359501115230705584_1287996"}}, "LowResolutionImage"]SocialMediaData[{"Instagram", {"Media", "359501115230705584_1287996"}}, "Thumbnail"]SocialMediaData[{"Instagram", {"Media", "368809902030501891_199112861"}}, "Owner"]SocialMediaData[{"Instagram", {"Media", "368809902030501891_199112861"}}, "OwnerID"]SocialMediaData[{"Instagram", {"Media", "368809902030501891_199112861"}}, "Comments"]//ShortSocialMediaData[{"Instagram", {"Media", "368809902030501891_199112861"}}, "Likes"]//ShortSocialMediaData[{"Instagram", {"Media", "368809902030501891_199112861"}}, "LikeIDs"]//ShortSocialMediaData[{"Instagram", {"Media", "368809902030501891_199112861"}}, "LikeCount"]Twitter (15)
Basic (4)
SocialMediaData["Twitter"]Get a list of possible properties:
SocialMediaData["Twitter", "Properties"]SocialMediaData["Twitter", "Friends"]SocialMediaData["Twitter", "Friends"]Get the textual description of a property:
SocialMediaData["Twitter", "FollowerIDs", "Description"]SocialMediaData["Twitter", "FollowerIDs", "Information"]Followers (4)
SocialMediaData["Twitter", "Followers"]//ShortSocialMediaData["Twitter", "FollowerIDs"]//ShortSocialMediaData[{"Twitter", "yanzhang20"}, "Followers"]//ShortSocialMediaData["Twitter", "FollowerNetwork"]SocialMediaData[{"Twitter", "16003913"}, "FollowerNetwork"]Get the network of followers linked by reply-to relationship:
SocialMediaData["Twitter", "FollowerReplyToNetwork"]SocialMediaData[{"Twitter", "16003913"}, "FollowerReplyToNetwork"]Get the network of followers linked by their mentions relationship:
SocialMediaData["Twitter", "FollowerMentionNetwork"]SocialMediaData[{"Twitter", "16003913"}, "FollowerMentionNetwork"]Friends (4)
SocialMediaData["Twitter", "Friends"]//ShortSocialMediaData["Twitter", "FriendIDs"]//ShortSocialMediaData[{"Twitter", "yanzhang20"}, "Friends"]//ShortSocialMediaData["Twitter", "FriendNetwork"]SocialMediaData[{"Twitter", "16003913"}, "FriendNetwork"]Get the network of friends linked by replies-to relationship:
SocialMediaData["Twitter", "FriendReplyToNetwork"]SocialMediaData[{"Twitter", "16003913"}, "FriendReplyToNetwork"]Get the network of friends linked by their mentions relationship:
SocialMediaData["Twitter", "FriendMentionNetwork"]SocialMediaData[{"Twitter", "16003913"}, "FriendMentionNetwork"]Search (3)
Get the network of search based on follower relationship:
SocialMediaData["Twitter", {"SearchNetwork", "Wolfram Fun Facts"}]Get the network of search based on reply-to relationship:
SocialMediaData["Twitter", {"SearchReplyToNetwork", "Wolfram Fun Facts"}]Get the network of search based on mention relationship:
SocialMediaData["Twitter", {"SearchMentionNetwork", "Obama"}]LinkedIn (7)
Basic (4)
SocialMediaData["LinkedIn"]Get a list of possible properties:
SocialMediaData["LinkedIn", "Properties"]SocialMediaData["LinkedIn", "Connections"]//ShortGet more information about a property:
SocialMediaData["LinkedIn", "ConnectionIDs", "Information"]SocialMediaData["LinkedIn", "ConnectionIDs", "Description"]Connections (2)
Applications (7)
Facebook (4)
Visualize communities in a Facebook friend network:
g = SocialMediaData["Facebook", "FriendNetwork"]CommunityGraphPlot[g, CommunityBoundaryStyle -> Dashed]Find connectors: highly popular people in a Facebook friend network:
g = SocialMediaData["Facebook", "FriendNetwork"]Rank friends based on popularity. Highest-ranked friends have the most connections:
friends = VertexList[g];ranking = Reverse[Ordering[DegreeCentrality[g]]];Part[friends, ranking]Part[friends, ranking[[ ;; 5]]]HighlightGraph[g, %, GraphHighlightStyle -> "DehighlightGray"]Find isolates in a Facebook friend network:
g = SocialMediaData["Facebook", "FriendNetwork"]Isolates have no more than one connection:
isolates = Pick[VertexList[g], DegreeCentrality[g], 0 | 1]HighlightGraph[g, isolates, GraphHighlightStyle -> "DehighlightGray", VertexSize -> Large]Find brokers in a Facebook friend network:
g = SocialMediaData["Facebook", "FriendNetwork"]Brokers are on many shortest paths connecting other friends in the network:
friends = VertexList[g];ranking = Reverse[Ordering[BetweennessCentrality[g]]];Part[friends, ranking]Part[friends, ranking[[ ;; 2]]]HighlightGraph[g, %, GraphHighlightStyle -> "DehighlightGray"]Twitter (3)
Visualize communities in a Twitter follower network:
g = SocialMediaData["Twitter", "FollowerNetwork"][image]CommunityGraphPlot[g, CommunityBoundaryStyle -> Dashed]Find influencers in a Twitter follower network:
g = SocialMediaData["Twitter", "FollowerNetwork"][image]Influencers are closely connected to other followers in the network:
influencers = Map[AnnotationValue[{g, #}, "Name"]&, VertexList[g]];ranking = Reverse[Ordering[ClosenessCentrality[g]]];Part[influencers, ranking]Part[VertexList[g], ranking[[ ;; 5]]]HighlightGraph[g, %, GraphHighlightStyle -> "DehighlightGray"]Find brokers in a Twitter friend network:
g = SocialMediaData["Twitter", "FriendNetwork"][image]Brokers are on many shortest paths connecting other friends in the network:
friends = Map[AnnotationValue[{g, #}, "Name"]&, VertexList[g]];ranking = Reverse[Ordering[BetweennessCentrality[g]]];Part[friends, ranking]Part[VertexList[g], ranking[[ ;; 2]]]HighlightGraph[g, %, GraphHighlightStyle -> "DehighlightGray"]Possible Issues (2)
Use ClearSystemCache to clear caches of results and to force re-authentication:
ClearSystemCache[]SocialMediaData["Facebook", "Friends"]//ShortSocialMediaData is subject to restrictions associated with external social media sites:
SocialMediaData["Twitter", "RateLimit"]The "Friends" property for "Facebook" gives only friends who also use SocialMediaData:
SocialMediaData["Facebook", "Friends"]See Also
History
Text
Wolfram Research (2012), SocialMediaData, Wolfram Language function, https://reference.wolfram.com/language/ref/SocialMediaData.html.
CMS
Wolfram Language. 2012. "SocialMediaData." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SocialMediaData.html.
APA
Wolfram Language. (2012). SocialMediaData. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SocialMediaData.html
BibTeX
@misc{reference.wolfram_2026_socialmediadata, author="Wolfram Research", title="{SocialMediaData}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/SocialMediaData.html}", note=[Accessed: 15-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_socialmediadata, organization={Wolfram Research}, title={SocialMediaData}, year={2012}, url={https://reference.wolfram.com/language/ref/SocialMediaData.html}, note=[Accessed: 15-June-2026]}