facebook / facebook-php-business-sdk

PHP SDK for Meta Marketing API
https://developers.facebook.com/docs/business-sdk
Other
818 stars 514 forks source link

Messenger Ads How To Add Personalization Fields #495

Closed Stacey940 closed 5 years ago

Stacey940 commented 5 years ago

Hi,

I am placing ads for Messenger , in the Custom Payload What field can I use to add First Name for the user. I tried {{user_first_name}} , but its not working. Below is the Json I tried


{
    "attachment": {
        "type": "template",
        "payload": {
            "template_type": "generic",
            "elements": [
                {
                    "title": "Enter a title to accompany your image {{user_first_name}}",
                    "image_url": "https://image.ibb.co/bz5t6Q/placeholder.png",
                    "subtitle": "Optional: Enter a subtitle to provide more information",
                    "buttons": [
                        {
                            "type": "web_url",
                            "url": "http://www.example.com/",
                            "title": "View Website"
                        },
                        {
                            "type": "postback",
                            "title": "Start Chatting",
                            "payload": "USER_DEFINED_PAYLOAD"
                        }
                    ]
                }
            ]
        }
    },
}```
jingping2015 commented 5 years ago

Since we want to handle bugs more efficiently, we've decided to close issue reporting in Github and move to our dedicated bug reporting channel. If you encounter a bug with Business SDK (PHP), please report the issue at our developer bug reporting channel.

Stacey940 commented 5 years ago

@jingping2015 This was not a bug reporting. I needed help to insert Personalization Fields in the page_welcome_message when creating ads through api calls