

This document describes how to integrate Kakao Talk Social APIs into your service with the Kakao SDK for Flutter ("Flutter SDK").
| Reference | App setting |
|---|---|
profile()TalkProfile |
Install Initialize |
| Permission | Prerequisite | Kakao Login | User consent |
|---|---|---|---|
| - | Platform key Activate Kakao Login Manage consent items |
Required | Required: Profile Info(nickname/profile image) Nickname Profile image |
Retrieves Kakao Talk profile information linked to the Kakao Account of the logged-in user.
You can check the types and differences of user profiles available through the Kakao API in User profile.
Call profile().
profile() returns the TalkProfile object which contains the user's Kakao Talk profile information.
The Kakao Talk profile obatained though profile() is different from the profile of Kakao Account. Refer to Concepts.
try {
TalkProfile profile = await TalkApi.instance.profile();
print('Succeeded in retrieving Kakao Talk profile.\nNickname: ${profile.nickname}\nProfile image: ${profile.thumbnailUrl}\nCountry code: ${profile.countryISO}');
} catch (error) {
print('Failed to retrieve Kakao Talk profile. $error');
}
| Reference | App setting |
|---|---|
selectFriend()SelectedUsersPickerFriendRequestParams |
Install Initialize Set up for hybrid app: For redirection |
| Permission | Prerequisite | Kakao Login | User consent |
|---|---|---|---|
| Required | Platform key Activate Kakao Login Manage consent items |
Required | Required: Friends List in Kakao Service(Including profile image, nickname, and favorites) |
Opens the Friend picker and returns the information of the Kakao Talk friends selected by the use
When calling selectFriend(), you can choose the selection type of the Friend picker based on the parameters.
To use a multi-picker, set enableMulti to true. To use a single picker, set enableMulti to false. If not set, the multi-picker is applied.
For additional settings such as screen orientation and search behavior, configure PickerFriendRequestParams. For detailed parameters, refer to the reference.
The components can be set by parameters.
For a web page, Redirection is available.
If a user selects friends on the picker display, the information of the friends that a user selects from the Friend picker is returned through SelectedUsers. If the request failed or a problem occurred, refer to the Error code to check the cause.
// Parameter setting
final params = PickerFriendRequestParams(
title: 'Single Picker', // Name of the picker
enableSearch: true, // Enables the search function
showFavorite: true, // Marks on favorite friends
enableBackButton: true, // Enables the back button, available for web with redirect method or native app
);
// Call the picker
try {
final SelectedUsers users = await PickerApi.instance.selectFriend(context: context, params: params, enableMulti: false);
print('Success: ${users.users!.length}');
} catch(error) {
print('Failure: $error');
}
// Parameter setting
final params = PickerFriendRequestParams(
title: 'Multi-Picker', // Name of the picker
enableSearch: true, // Enables the search function
showFavorite: true, // Marks on favorite friends
showPickedFriend: true, // Displays selected friends for multi-picker
maxPickableCount: 5, // Maximum pickable count
minPickableCount: 1, // Minimum pickable count
enableBackButton: true, // Enables the back button, available for web with redirect method or native app
);
// Call the picker
try {
final SelectedUsers users = await PickerApi.instance.selectFriend(context: context, params: params, enableMulti: true);
print('Success: ${users.users!.length}');
} catch(error) {
print('Failure: $error');
}
This feature is not available for the native app.
To call the friend picker on the current web page, use returnUrl parameter.
Specify the URL of the service server that processes the response to the returnUrl parameter. returnUrl must be one of the domains in [App] > [Platform key] > [REST API key] > JavaScript SDK domain on the app management page. Use the enableBackButton parameter to disable the back button.
When the user completes choosing friends, the web page will HTTP 302 redirect with the response as an encoded query string to the returnUrl.
// Web, redirection
// Parameter setting
final PickerFriendRequestParams params = PickerFriendRequestParams(
title: 'Multi-Picker', // Name of the picker
enableSearch: true, // Enables the search function
showFavorite: true, // Marks on favorite friends
showPickedFriend: true, // Displays selected friends for multi-picker
maxPickableCount: 5, // Maximum pickable count
minPickableCount: 1, // Minimum pickable count
returnUrl: 'https://developers.kakao.com', // Essential
enableBackButton: true, // Enables the back button, available for web with redirect method or native app
);
// Call the picker
// Success: ${returnUrl}?selected=${SelectedUsers}
// Failure: ${returnUrl}?error=${Error}
await PickerApi.instance.selectFriend(context: context, params: params, enableMulti: true);
| Reference | App setting |
|---|---|
friends()Friends |
Install Initialize |
| Permission | Prerequisite | Kakao Login | User consent |
|---|---|---|---|
| Required | Platform key Activate Kakao Login Manage consent items |
Required | Required: Friends List in Kakao Service (Including profile image, nickname, and favorites) |
Retrieves Kakao Talk friend information linked to the Kakao Account of the logged-in user.
Call friends().
friends() returns Friends which contains a list of the user's Kakao Talk friends.
If the request fails because the user has not agreed to provide the Friends list, proceed the followings:
try {
Friends friends = await TalkApi.instance.friends();
print('Succeeded in retrieving a list of friends.\n${friends.elements?.map((error) => error.profileNickname).join('\n')}');
// You can send a message to the friends using their UUIDs.
} catch (error) {
print('Failed to retrieve a list of friends. $error');
}