사이드 메뉴
Getting started
Kakao Developers
Login
Communication
Advertisement
- Concepts
- Ad creation: Ad account
- Ad creation: Campaign
- Ad creation: Ad group
- Targeting for ad group
- Custom audience targeting for ad group
- Ad creation: Creative common
- Ad creation: Display creative
- Ad creation: Message creative
- Ad creation: Personalized message creative
- Bizboard landing settings
- Report
- Message management
- Personalized message management
- Message ad management
- Message ad operation
- Ad View management
- Business Form linkage management
- Pixel & SDK linkage management
- Audience management
- Engagement targeting management
- Customer file management
- Friend group management
- Ad account management
- Reference
- Type information
- Error code
Flutter
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 through parameters.
Set enableMulti to true for multi picker or false for single picker. If not specified, multi picker is applied.
You can also configure screen orientation, search options, and other details through PickerFriendRequestParams. For detailed parameter information, refer to 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 settingfinal params = PickerFriendRequestParams(title: 'Single Picker', // Name of the pickerenableSearch: true, // Enables the search functionshowFavorite: true, // Marks on favorite friendsenableBackButton: true, // Enables the back button, available for web with redirect method or native app);// Call the pickertry {final SelectedUsers users = await PickerApi.instance.selectFriend(context: context, params: params, enableMulti: false);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 settingfinal PickerFriendRequestParams params = PickerFriendRequestParams(title: 'Multi-Picker', // Name of the pickerenableSearch: true, // Enables the search functionshowFavorite: true, // Marks on favorite friendsshowPickedFriend: true, // Displays selected friends for multi-pickermaxPickableCount: 5, // Maximum pickable countminPickableCount: 1, // Minimum pickable countreturnUrl: 'https://developers.kakao.com', // EssentialenableBackButton: 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:
- Check if 'Friends List in Kakao Service(Including profile image, nickname, and favorites)' is set to 'Consent during use' in Consent items.
- Request additional consent to the 'Friends List in Kakao Service(Including profile image, nickname, and favorites)' scope.
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');}