# C# LineBotSDK 教學

## 範例與SDK下載點

LineBotSDK的範例網址 :&#x20;

{% embed url="<https://github.com/Martin-Hsu/LineBotSDK_Example>" %}
LineBotSDK的範例
{% endembed %}

LineBotSDK 下載點:

{% embed url="<https://www.nuget.org/packages/LineBot.SDK>" %}
LineBotSDK 下載點
{% endembed %}

{% hint style="info" %}
建議可以搭配範例來學習
{% endhint %}

## 基礎使用方式

當安裝完LineBotSDK後，使用方式加入using後就可以使用:

```csharp
using LineBotSDK.Utility;

namespace LineBotSDK_Example
{
    class Program
    {
        static void Main(string[] args)
        {
            string token = "";
            string userid = "";
            string image_url = "https://i0.wp.com/blog.patw.me/wp-content/uploads/2017/05/ZcNMMLg.png?fit=800%2C416&ssl=1";

            MessageUtility.PushTextMessage(token, userid, "Hi");

            MessageUtility.PushImageMessage(token, userid, image_url, image_url);
        }
    }
}
```

{% hint style="warning" %}
using LineBotSDK.Utility
{% endhint %}

## 學習章節

* [**推播訊息給使用者**](https://martinhsu.gitbook.io/linebotsdk/tui-bo-xi-shi-yong-zhe)


---

# Agent Instructions: 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:

```
GET https://martinhsu.gitbook.io/linebotsdk/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
