[Gametize Tech] API: User Following/Followers
FeaturedAction
For the action to follow or unfollow user, the result object may contain the following keys:
-
newFollow: Indicate if logged-in user has followed the user before.
-
userFollowed: Indicate if the action resulting in following (true) or unfollowing (false)
Follow / Unfollow User
To follow or unfollow user. This is a single action which context will change depending on the current user follow status (i.e. to follow user if target user is currently not followed; to unfollow user if target user is currently followed).
/api2/action/follow.json
Parameters:
-
project_id
-
type_id (Referring to user ID of the user to be followed or unfollowed)
-
session_key
Profile Data Retrieval
For user profile retrieval, the user object may contain the following keys:
-
userFollowerCount: The number of followers that the queried user profile has.
-
userFollowingCount: The number of following that the queried user profile has.
-
userFriendCount: The number of friends that the queried user profile has.
-
userFriended: If true - From the logged-in user perspective, the queried user is BOTH being followed and is also following the logged-in user. (Key is returned when viewing other users, not-self)
-
userFollowed: If true - From the logged-in user perspective, the queried user is being followed. (Key is returned when viewing other users, not-self)
-
userIsFollowedBy: If true - From the logged-in user perspective, the queried user is following the logged-in user. (Key is returned when viewing other users, not-self)
Retrieve User Profile
To retrieve user profile:
/api2/users/ID.json
Parameters:
-
project_id
-
session_key
List Data Retrievals
For list of users retrieval, the user object may contain the following keys:
-
userFriended: If true - From the logged-in user perspective, the queried user is BOTH being followed and is also following the logged-in user. (Key is returned when viewing other users, not-self)
-
userFollowed: If true - From the logged-in user perspective, the queried user is being followed. (Key is returned when viewing other users, not-self)
-
userIsFollowedBy: If true - From the logged-in user perspective, the queried user is following the logged-in user. (Key is returned when viewing other users, not-self)
1. Retrieve Followers List
To retrieve list of users who followed the queried user profile.
/api2/users/ID/followers.json
Parameters:
-
project_id (If not supplied, only able to enquire own-self data)
-
session_key
-
keywords (For searching users in the list)
-
page
-
limit
2. Retrieve Following List
To retrieve list of users whom the queried user profile followed.
/api2/users/ID/following.json
Parameters:
-
project_id (If not supplied, only able to enquire own-self data)
-
session_key
-
keywords (For searching users in the list)
-
page
-
limit
3. Retrieve Friends List
To retrieve list of users whom BOTH the queried user profile followed and also followed back.
/api2/users/ID/friends.json
Parameters:
-
project_id (If not supplied, only able to enquire own-self data)
-
session_key
-
keywords (For searching users in the list)
-
page
-
limit
Note:
The article's technical specifications and details are subject to potential changes based on our discretion. It is important to note that the information presented in the article might have become outdated or lost its relevance in the present context.
If you are interested to learn more about this, please drop an email to support@gametize.com with your queries regarding the article!
Please sign in to leave a comment.
Comments
0 comments