Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOS, how can I follow the merchant account in the App? We need to send the logistics information. #104

Open
Pluto1219 opened this issue Jul 9, 2024 · 1 comment

Comments

@Pluto1219
Copy link

Pluto1219 commented Jul 9, 2024

SOS, how can I follow the merchant account in the App? We need to send the logistics information.
If I have any misunderstanding about flutter_line_sdk, please correct me, thank you very much.

Is it possible to provide a way to follow a business? For example,

void followBusinessAccount() async {
  final businessAccountID = 'BUSINESS_ACCOUNT_ID';

  try {
    final followResult = await LineSDK.instance.follow(
      accountID: businessAccountID,
    );

    if (followResult.isSuccess) {
      print('Successfully followed business account!');
      // Handle successful follow operation
    } else {
      print('Failed to follow business account: ${followResult.errorMessage}');
      // Handle follow failure
    }
  } on PlatformException catch (e) {
    print('Error following business account: ${e.message}');
    // Handle platform exceptions
  }
}

@onevcat
Copy link
Member

onevcat commented Jul 10, 2024

The LINE SDK for Flutter project currently primarily provides features such as logging in using a LINE account. As far as I know, there is no public API available for performing arbitrary account follow operations at this time. This operation involves the core interests of user accounts. You can display an "Add Friend" button through some of the methods below and expect users to perform the operation themselves.

  1. When using the LINE SDK for Flutter, add the botPrompt setting when passing in LoginOption.

You can find the relevant documentation here: https://pub.dev/documentation/flutter_line_sdk/latest/flutter_line_sdk/LoginOption/botPrompt.html

  1. Use the LINE Social Plugin's Add friend feature to add a button to your webpage or application.

For more details, please refer to https://developers.line.biz/en/docs/line-social-plugins/install-guide/using-add-friend-buttons/#about

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants