Introduction to GetSocial Social Graph¶
Social Graph feature lets you add a concept of friends to your app.
Up until now, the most common way to build this was with the help of Facebook login. However, there’s a tendency between users to use Facebook less, when logging into apps, even if they can.
But people still have friends, even outside Facebook! Think of your private chat rooms in WhatsApp or
#random channel in some Slack community.
Populating Social Graph¶
There are 3 ways to create a relationship between users in Social Graph:
Explicitly add a friend to the current user via the SDK to Build Social Graph Relationships.
User sends Smart Invite link and the receiving person installs the app.
Facebook identity was added to the user and we were able to find some of his/her friends, who are already using the app with Facebook attached.
Querying the Social Graph¶
Right now, there are 3 types of queries you can make to Social Graph, related to the user.
Get the list of friends of the current user.
Get the count of friends of the current user (useful for displaying badges).
Check, if a user is the friend of the current user.
Get the list of suggested friends for the current user. “Suggested friends” are the users with whom the current user has mutual friends.
Querying the Social Graph article has the exact SDK method descriptions for each platform.