> For the complete documentation index, see [llms.txt](https://developer.aliothx.net/start/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.aliothx.net/start/option/index/sns.md).

# SNS 공유

## 텍스트, URL 공유

텍스트 또는 링크 입력 후 사용 중인 앱을 선택하여 공유합니다.&#x20;

```dart
SnsShare().shareWithSns(
                  title: 'Example title',
                  text: textValue,
                  url: urlValue,
                  chooserTitle: 'Example chooser title',
                );
```

## 로컬 파일 공유

로컬 파일 선택 후 사용 중인 앱을 선택하여 공유합니다.&#x20;

```dart
FilePickerResult? result = await FilePicker.platform.pickFiles();

if (result != null) {
  File file = File(result.files.single.path!);
  SnsShare().shareLocalFile(
    title: 'Example local file share',
    path: file.toString(),
    text: 'Example local file share text',
   );
```

## 카카오톡 피드 공유

카카오톡 앱(설치 시) 또는 웹(미설치 시)으로 공유합니다.

```dart
SnsShare().shareWithKakaoTalk(feedTemplate: defaultFeed);
```

## 카카오스토리 사진 포스팅&#x20;

카카오스토리로 사진을 포스팅 합니다.&#x20;

<pre class="language-dart"><code class="lang-dart"><strong>SnsShare().shareWithKakaoStory(
</strong>                  byteData: await rootBundle.load('assets/jpg/photo.jpeg'),
                  tempFile: File(
                      '${(await getTemporaryDirectory()).path}/photo.jpeg'),
                  content: 'Posting photo from Kakao SDK Sample.',
                );
</code></pre>

## 페이스북 스토리 공유

로컬 사진 선택 후 페이스북 스토리로 공유합니다.&#x20;

```dart
SnsShare().shareWithFacebookStory();
```

## 인스타그램 스토리 공유

로컬 사진 선택 후 인스타그램 스토리로 공유합니다.&#x20;

```dart
SnsShare().shareWithInstagramStory();
```

## 트위터 공유

트위터 앱(설치 시) 또는 웹(미설치 시)으로 공유합니다.&#x20;

```dart
SnsShare().shareWithTwitter(text: textValue!);
```

## SMS 전송

텍스트 또는 링크를 문자로 전송합니다.&#x20;

```dart
SnsShare().shareWithSms(text: textValue!);
```

## 클립보드 복사

텍스트 또는 링크를 복사합니다.&#x20;

```dart
SnsShare().copyToClipboard(text: textValue!);
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.aliothx.net/start/option/index/sns.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
