Facebook JSON Ads script setting

By default, in Facebook ads, users who click "Send Message" will receive pre-set plain text messages, and then wait for a response from chat staff.

Facebook Ads JSON tool helps you create opt-in messages with a structure to respond accordingly when users click on your ad.

Specifically, when a user clicks a button in an advertising message, it will immediately be included in the script in the Block with many customization options: Text, Button, Image, Viral, Spin, …

At the ad manager, scroll down to Message Templates > Advanced Setup > Edit

Here, the screen shows the code content for you to edit, and there is an immediate preview on the right. The pre-made template of the ad allows you to use Button in Quick Reply, you have the option to use one of these two forms. This article only guides on how to use Button to lead customers to URL / Block messages in Fchat.

{
    "message": {
        "attachment": {
            "type": "template",
            "payload": {
                "template_type": "generic",
                "elements": [
                    {
                        "title": "CHATBOT MESSENGER, INSTAGRAM, ZALO",
                        "image_url": "https://i.imgur.com/W8UXEyq.jpg",
                        "subtitle": "Fchat - Fanpage and Zalopage Management Software",
                        "buttons": [
                            {
                                "type": "web_url",
                                "url": "https://fchat.co//",
                                "title": "Go fchat.co"
                            },
                            {
                                "type": "postback",
                                "title": "View scripts",
                                "payload": "ebfbb567817f879aa6d6b38"
                            }
                        ]
                    }
                ]
            }
        }
    }
}

You can edit the code right on the ad or copy the content above and edit the content inside the quotes, then paste it into Advanced JSON Setup.

Note:

  • You need to change the Block ID of the page that is setting up ads before pasting the code.
  • Block ID is the last string of characters on the chosen block’s URL

After setting up, click Preview in Messenger to see the ad display with customers and test the script before completing the ad.

The ad is displayed as shown in the image below:

Good luck!

×