2016-06-16 7 views
10

Facebookのボットチャットシステムのボタンメッセージタイプでは、最大3つのボタンがあることは明らかです(文書化されていません)。これは恣意的で制限的なようです。 3つ以上のボタンを持つ方法があれば誰にも分かりますか?Facebookのボットボタンテンプレートの制限はありますか?

明確にするために、私は次のようなメッセージJSONを参照しています:

{ 
    "recipient":{ 
    "id":"USER_ID" 
    }, 
    "message":{ 
    "attachment":{ 
     "type":"template", 
     "payload":{ 
     "template_type":"button", 
     "text":"What do you want to do next?", 
     "buttons":[ 
      { 
      "type":"web_url", 
      "url":"https://petersapparel.parseapp.com", 
      "title":"Show Website" 
      }, 
      { 
      "type":"postback", 
      "title":"Start Chatting", 
      "payload":"USER_DEFINED_PAYLOAD" 
      } 
     ] 
     } 
    } 
    } 
} 
+1

なし、私は、任意のそれを呼び出すことはありません制限 – WizKid

+0

周りに方法はありません。 Facebookは自社の製品に関する多くのUXの調査をしており、機能に限界があるとすれば、それは通常考えられていることではなく、ただようものではない。たぶんあなたは、ユーザーをボタンのボタンと混同しないようにしたいと思うでしょう。 – CBroe

答えて

12

この制限を回避する方法はありません。

タイトル:80文字

字幕:80文字

コール・ツー・アクションタイトル:20文字

コールへのFacebookは明らかに汎用テンプレートhereの限界を文書化しています-action items:3つのボタン

1メッセージあたりの泡(水平スクロール):10個の要素

1つのバブルに最大3つのボタンがあります。 3つのボタンを追加して別のバブルを追加することができます。例:

{ 
    "recipient": { 
    "id": "RECIPIENT_ID" 
    }, 
    "message": { 
    "attachment": { 
     "type": "template", 
     "payload": { 
     "template_type": "generic", 
     "elements": [ 
      { 
      "title": "Swipe left/right for more options.", 
      "buttons": [ 
       { 
       "type": "postback", 
       "title": "Button 1", 
       "payload": "button1" 
       }, 
       { 
       "type": "postback", 
       "title": "Button 2", 
       "payload": "button2" 
       }, 
       { 
       "type": "postback", 
       "title": "Button 3", 
       "payload": "button3" 
       } 
      ] 
      }, 
      { 
      "title": "Swipe left/right for more options.", 
      "buttons": [ 
       { 
       "type": "postback", 
       "title": "Button 4", 
       "payload": "button4" 
       }, 
       { 
       "type": "postback", 
       "title": "Button 5", 
       "payload": "button5" 
       }, 
       { 
       "type": "postback", 
       "title": "Button 6", 
       "payload": "button6" 
       } 
      ] 
      } 
     ] 
     } 
    } 
    } 
} 

1つの汎用テンプレートに最大10個のバブルを追加できます。

OR

あなたはquick repliesを使用することができます。

ます。また、「クイック回答」を使用することができます
2

あなたはbotframeworkアプローチを使用することができます。汎用テンプレートを使用してオプションを送信します。 options part 1options part 2

"attachment": { 
    "type": "template", 
    "payload": { 
     "template_type": "generic", 
     "elements": [{ 
      "title": "group of options part 1",      
      "buttons": [ { 
       "type": "postback", 
       "title": "option 1", 
       "payload": "option 1", 
      }, ..., 
      { 
       "type": "postback", 
       "title": "option 3", 
       "payload": "option 3", 
      }], 
     }, ..., 
     { 
      "title": "group of options 10", 
      "buttons": [{ 
       "type": "postback", 
       "title": "option 28", 
       "payload": "option 28", 
      }, ..., 
      { 
       "type": "postback", 
       "title": "option 30", 
       "payload": "option 30", 
      }], 
     }] 
    } 
} 
関連する問題