Hive provides profile page that allows Hive members to set a unique profile image and nickname. APIs are also available to search profile data which users set.
Hive Profile Data
User profile is available to search with Hive API, and defined by ProfileHive
class. Detailed composition is as follows:
Name | Type | Description |
---|---|---|
vid | String | A unique ID in a game regardless of Hive sign-up |
uid | String | A unique ID issued to Hive user |
identifier | String(12) | Hive Login ID |
userName | String(128) | User name or the name set on Facebook If a user creates a Hive account by using the Facebook account, the Facebook name will display on Hive. When the user changes its profile name on Hive after creating the account, the player has Hive profile name and Facebook name individually |
facebookId | String | Facebook ID if a user syncs the Facebook account with Hive.
If not, the value is |
googleplusId | String | [Android Only] Google+ ID if a user syncs the Google+ account with Hive |
profileImageUrl | String | Profile image URL. If a user did not set the profile image, default image URL on Hive is returned |
country | String | Country code based on user’s IP
Format: ISO 3166-1 alpha-2 e.g. |
comment | String | A daily comment that user typed |
String | User’s email, available for Hive sign-in | |
birthday | String | User’s birthday. Null is displayed without birthday setting
Format: yyyy-mm-dd |
gender | String | User’s gender
|
gameFriend | Boolean | It explains whether users have friends who installed the same game user currently play
|
assnet | String | It explains who signed up Hive via what game
|
Hive Profile Search
Game users can search their profile on Hive. To display profile on the in-game screen rather than visiting profile page, search the profile data by implementing getMyProfile()
method of SocialHive class.
Followings are sample codes to search profile information of Hive users.
API Reference: hive.SocialHive.getMyProfile
1 2 3 4 5 6 7 8 9 10 11 12 13 |
// Callback handler managing the result of Hive profile data public void onProfileHiveCB(ResultAPI result, List profileList) { hive.Logger.log("SocialHiveTestView.onProfileHiveCB() Callback\nresult = " + result.toString() + "\n"); hive.Logger.log("profileList = \n"); foreach (ProfileHive each in profileList) { hive.Logger.log (each.toString() + "\n"); } } // Search Hive profile data hive.SocialHive.getMyProfile(onProfileHiveCB); |
API Reference: SocialHive::getMyProfile
1 2 3 4 5 6 7 8 9 10 11 12 |
// Search Hive profile data SocialHive::getMyProfile([=](ResultAPI result, std::vector profileList){ // Callback the result cout<<"SocialHive::getMyProfile() Callback"<<endl; cout<<"result = "<<result.toString()<<endl; if( result.isSuccess() && profileList != nullptr) { for_each(profileList.begin(), profileList.end(), [=](ProfileHive profile){ cout<<"profile = "<<profile.toString()<<endl; }); } }); |
API Reference: com.hive.SocialHive.getMyProfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
// Search Hive profile data SocialHive.getMyProfile(new SocialHive.ProfileListener() { @Override public void onProfile(ResultAPI result, List profileList) { // Callback the result Logger.v("SocialHive.getMyProfile() Callback"); Logger.v("result = " + result.toString()); if( result.isSuccess() && profileList != null) { for (ProfileHive profile : profileList) { Logger.v("profile = " + profile.toString()); } } } }); |
API Reference: SocialHive:getMyProfile
1 2 3 4 5 6 7 8 9 10 11 12 |
// Search Hive profile data [HIVESocialHive getMyProfile:^(HIVEResultAPI *result, NSArray *profileList) { // Callback the result NSLog(@"HIVESocialHive getMyProfile() Callback"); NSLog(@"result = %@",[result description]); if( [result isSuccess] && profileList != nil) { for (HIVEProfileHive *profileHive in profileList) { NSLog(@"profileHive = %@",profileHive); } } }]; |