> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Business Profile API

> Google Business Profile APIを使用した投稿のオプション

export const PlansAvailable = ({plans = [], maxPackRequired}) => {
  let displayPlans = plans;
  if (plans && plans.length === 1) {
    const lowerCasePlan = plans[0].toLowerCase();
    if (lowerCasePlan === "business") {
      displayPlans = ["Launch", "Business", "Enterprise"];
    } else if (lowerCasePlan === "premium") {
      displayPlans = ["Premium", "Launch", "Business", "Enterprise"];
    }
  }
  return <Note>
Available on {displayPlans.length === 1 ? "the " : ""}
{displayPlans.join(", ").replace(/\b\w/g, l => l.toUpperCase())}{" "}
{displayPlans.length > 1 ? "plans" : "plan"}.

{maxPackRequired && <span onClick={() => window.open('https://www.ayrshare.com/docs/additional/maxpack', '_self')} className="flex items-center mt-2 cursor-pointer">
 <span className="px-1.5 py-0.5 rounded text-sm" style={{
    backgroundColor: '#C264B6',
    color: 'white',
    fontSize: '12px'
  }}>
   Max Pack required
 </span>
</span>}
</Note>;
};

## Google Business Profileへの投稿

以前はGoogle My Businessとして知られていたGoogle Business Profileでは、Google Business Profile APIを使用して4種類の投稿を作成できます。
以下の例では、`post`テキストがユーザーのGoogleビジネスページへの更新として投稿されます。
Google Business Profile(GBP)の[詳細](https://www.ayrshare.com/blog/google-my-business-what-is-gmb-why-you-need-it-and-how-to-use-it/)についてはこちらをご覧ください。

<Warning>
  AyrshareにリンクさせるまえにGoogle Business Profileページを[請求](https://support.google.com/business/answer/2911778)する必要があります。リンク認証時には、GBPページの管理者であるGoogleアカウントを必ず選択してください。ビジネスプロフィールも認証済みで公開されている必要があります。

  GBPの管理コンソールへのアクセスや認証ステータスの確認は[https://business.google.com/](https://business.google.com/)で行えます。
</Warning>

Google Business Profile APIでは、現在のところ商品投稿を作成できません。

GBPへのテキストのみの基本投稿用JSON。「What's New」セクションに表示されます:

```json Google Business Profile Post theme={"system"}
{
  "post": "The best GMB ever #best https://www.google.com",
  "platforms": ["gmb"] // Please note to use `gmb`
}
```

または、GBPへの画像付き基本投稿用JSON:

```json Google Business Profile Post with Image theme={"system"}
{
  "post": "The best GMB ever #best https://www.google.com",
  "mediaUrls": ["https://img.ayrshare.com/012/gb.jpg"],
  "platforms": ["gmb"]
}
```

<ul class="custom-bullets">
  <li>
    動画がmp4などの既知の動画拡張子で終わらない場合は、`isVideo`パラメータを使用してください。詳細は[/postエンドポイント](/apis/post/overview)を参照してください。
  </li>

  <li>
    詳細については、[Google Business Profileメディアガイドライン](/media-guidelines/google_business_profile)および[Google Business Profile認証](/dashboard/connect-social-accounts/google-business)をご覧ください。
  </li>
</ul>

## Google Business Profile投稿の要件

投稿に以下の内容が含まれていないことを確認してください。Googleは投稿を拒否し、投稿は「この投稿は利用できなくなりました」または、Googleコンソールに「拒否済み」ラベル付きで表示されます:

<ul class="custom-bullets">
  <li>電話番号。Googleは電話番号を含むすべての投稿を拒否します。</li>
  <li>スパム、虚偽の主張、虚偽の表現。</li>
  <li>ビジネスに関係のないオフトピックな投稿。</li>
  <li>重複コンテンツ。</li>
  <li>不適切なコンテンツ。</li>
  <li>攻撃的な言葉。</li>
</ul>

詳細については、[Google Business Profileのコンテンツポリシー](https://support.google.com/business/answer/7213077?hl=en)をご覧ください。

## 標準投稿(What's New)

標準ローカル投稿は、「*Posts*」GBPセクションに表示され、「What's New」として分類されます。
投稿テキスト、画像、またはCall to Action([下記参照](/apis/post/social-networks/google#call-to-action))を含めることができます。

Google Business Profile API経由でWhat's Newセクションに公開される動画はサポートされていません。
Google Business Profileへの動画公開方法の詳細については、[画像または動画投稿](#image-or-video-post)を参照してください。

*これらの投稿はGMB管理コンソールの「**Posts -> What's New**」セクションに表示されます。*

```json Google Business Profile Standard Post theme={"system"}
{
  "post": "A wonderful post",
  "platforms": ["gmb"],
  "mediaUrls": ["https://img.ayrshare.com/012/gb.jpg"], // optional - images only
  "gmbOptions": {
    "callToAction": {
      // optional
      "actionType": "learn_more",
      "url": "https://www.ayrshare.com"
    }
  }
}
```

## 画像または動画投稿

Google Business Profileに画像または動画の投稿を公開できます。
画像や動画はGBP管理コンソールの「**Photos**」セクションに表示されます。

### 要件

<ul class="custom-bullets">
  <li>
    GBPロケーションには、1つの画像または1つの動画のみを追加でき、これはGBPコンソールの「Photos」セクションに表示されます。
  </li>

  <li>1つの投稿につき1つの画像または動画のみが許可されます。</li>
  <li>投稿テキストはエンドポイントによって必要ですが、GBPでは使用されません。</li>
  <li>画像または動画投稿では、Call to Actionはサポートされていません。</li>
  <li>`gmbOptions`オブジェクトに必ず`isPhotoVideo`パラメータを含めてください。</li>
</ul>

```json Google Business Profile Image Post {6} theme={"system"}
{
  "post": "What an image!",
  "platforms": ["gmb"],
  "mediaUrls": ["https://img.ayrshare.com/012/gb.jpg"], // required
  "gmbOptions": {
    "isPhotoVideo": true, //required
    "category": "product" // optional
  }
}
```

### 動画処理

Googleはアップロードされた動画の処理に追加時間を要する場合があります。

Google Business Profileコンソールでメディアのステータスを確認できます:

1. [Google Business Profileコンソール](https://business.google.com/us/business-profile/)にアクセスします。
2. 「See your profile」ボタンをクリックします。GBPページに移動します。
3. 「Photos」タブをクリックします。
4. 写真と動画のリストが表示されます。
5. 表示したい写真または動画をクリックします。

<Warning>
  動画のステータスが「pending」の場合、Googleがまだ処理中です。数分待ってからページを更新してください。Google Business Profileが認証済みで、プロフィールが公開されていることを確認してください。

  動画が「pending」のままの場合、Google側のバグの可能性があります。
  サポートについては、[Google Business support](https://support.google.com/business/gethelp)にお問い合わせください。
</Warning>

### 商品カテゴリー

画像または動画に商品カテゴリーを指定して、GBPコンソールの「Photos」セクションにメディアを分類することができます。例えば、画像に「product」カテゴリーがあると、Photosの「Product」タブに表示されます。

特定のビジネスタイプでは、一部のカテゴリーが許可されていません。例えば、Ayrshareは食品/飲料業界ではないため、`food_and_drink`を使用できませんでした。

利用可能なカテゴリー:

<ul class="custom-bullets">
  <li>`cover`: カバー写真。1つのロケーションには1つのカバー写真のみが存在します。</li>
  <li>`profile`: プロフィール写真。1つのロケーションには1つのプロフィール写真のみが存在します。</li>
  <li>`logo`: ロゴ写真。</li>
  <li>`exterior`: 外観メディア。</li>
  <li>`interior`: 内観メディア。</li>
  <li>`product`: 商品メディア。</li>
  <li>`at_work`: 業務中メディア。</li>
  <li>`food_and_drink`: 食品・飲料メディア。</li>
  <li>`menu`: メニューメディア。</li>
  <li>`common_area`: 共用エリアメディア。</li>
  <li>`rooms`: 部屋メディア。</li>
  <li>`teams`: チームメディア。</li>
</ul>

## イベント投稿

ビジネスでのイベントを告知します。イベントにはタイトル、開始日と終了日が必要で、動画を含めることができます。例えば、不動産業者がオープンハウスの内覧会を宣伝することができます。

<ul class="custom-bullets">
  <li>イベントはCall to Actionをサポートします。</li>
  <li>`mediaUrls`パラメータでオプションの画像を含めます。</li>
  <li>イベントでは動画はサポートされていません。</li>

  <li>
    イベント投稿はGBP管理コンソールの「**Posts -> Events**」セクションに表示されます。
  </li>

  <li>`post`テキストはイベント詳細に使用されます。</li>
</ul>

```json Google Business Profile Event Post theme={"system"}
{
  "post": "A great event!", // Event Details
  "platforms": ["gmb"],
  "mediaUrls": ["https://img.ayrshare.com/012/gb.jpg"], // optional
  "gmbOptions": {
    "event": {
      "title": "Check this event out.", // required
      "startDate": "2021-08-12T20:17:46.384Z", // required
      "endDate": "2021-09-12T20:17:46.384Z" // required
    }
  }
}
```

## オファー投稿

ビジネスからのプロモーション・セールやオファーを提供します。オファーにはタイトルと開始日時、終了日時が必要です。「View offer」アクションボタンが投稿に自動的に追加されます。写真、説明、クーポンコード、リンク、利用規約も投稿に含めることができます。例えば、おもちゃ店が1週間、すべてのビニーベイビーを20%オフで宣伝することができます。

`mediaUrls`パラメータで画像を含めます。

*オファーでは動画はサポートされていません。*

*これらの投稿はGBP管理コンソールの「**Posts -> Offers**」セクションに表示されます。*

```json Google Business Profile Offers Post theme={"system"}
{
  "post": "A great offer for everyone!",
  "platforms": ["gmb"],
  "gmbOptions": {
    "offer": {
      "title": "Great Sale.", // required
      "startDate": "2021-08-12T20:17:46.384Z", // required
      "endDate": "2021-09-12T20:17:46.384Z", // required
      "couponCode": "BOGO-JET-CODE", // required - max 58 characters
      "redeemOnlineUrl": "https://www.ayrshare.com", // required
      "termsConditions": "Offer only valid if you can prove you are a time traveler" // required
    }
  }
}
```

<ul class="custom-bullets">
  <li>`couponCode`の最大文字数は58文字です。</li>
</ul>

## Call to Action

ビジネスに関する一般情報を提供し、アクションボタンとして表示されます。例えば、ウェブサイトが自社サイトへのリダイレクトとして\_Learn More\_ボタンを宣伝することができます。

Call to Actionは標準投稿またはイベントに追加できます。オファーにはCall to Actionを追加できません。

`mediaUrls`パラメータで画像を含めます。

```json Google Business Profile Call to Action Post theme={"system"}
{
  "post": "Take this action!",
  "platforms": ["gmb"],
  "mediaUrls": ["https://img.ayrshare.com/012/gb.jpg"], //optional
  "gmbOptions": {
    "callToAction": {
      "actionType": "order", // required
      "url": "https://www.ayrshare.com" // required for all action types but "call"
    }
  }
}
```

`actionType`は投稿にボタンとして表示されます。可能な値は以下のとおりです:

<ul class="custom-bullets">
  <li>**book**: ユーザーに予約、テーブル予約、または類似のアクションを促します。</li>
  <li>**order**: ユーザーに注文を促します。</li>
  <li>**shop**: ユーザーに商品カタログの閲覧を促します。</li>
  <li>**learn\_more**: ユーザーにウェブサイトでの追加詳細の閲覧を促します。</li>
  <li>**sign\_up**: ユーザーに登録、サインアップ、または参加を促します。</li>

  <li>
    **call**: ユーザーにビジネスへの電話発信を促します。`call`では`url`フィールドは不要です。ただし、Call actionを投稿に表示させるには、まずGoogle Business Profileに電話番号を設定しておく必要があります。
  </li>
</ul>

`url`パラメータは、クリック時にユーザーが誘導されるURLです。

追加の[Google Business Profile情報](https://www.ayrshare.com/blog/google-my-business-what-is-gmb-why-you-need-it-and-how-to-use-it/)はこちら。

<Card title="Google Business Profileの連携" icon="link" href="/dashboard/connect-social-accounts/google-business" horizontal />

## First Comment

Google Business Profileは投稿コメントをサポートしていないため、Google Business Profileのみの投稿では`firstComment`パラメータはスキップされます。
`firstComment`の警告/スキップオブジェクトが返されますが、投稿自体は成功し、エラーは発生しません。

## Google Business Profileのメンション

Google Business Profileの投稿に`@handle`を追加できますが、Google Business Profileは投稿テキスト内のメンション解決をサポートしていません。
`@handle`はプレーンテキストとして残ります。

## 文字数制限

詳細については、[Google Business Profileの文字数制限](/help-center/technical-support/character_limits#google-business-profile-character-limits)を参照してください。
