Log In Button Reference

The log in button triggers the account linking authentication flow.

For more information on using the log in button, see Log In Button.

Contents

Button Syntax

{
  "type": "account_link",
  "url": "<UNLINK_URL>"
}

Example Usage

curl -X POST -H "Content-Type: application/json" -d '{
  "recipient":{
    "id":"<PSID>"
  },
  "message":{
    "attachment":{
      "type":"template",
      "payload":{
        "template_type":"button",
        "text":"Try the log in button!",
        "buttons":[
          {
            "type": "account_link",
            "url": "https://www.example.com/authorize"
          }
        ]
      }
    }
  }
}' "https://graph.facebook.com/v2.6/me/messages?access_token=<PAGE_ACCESS_TOKEN>"

Example Response

{
  "recipient_id": "1254477777772919",
  "message_id": "AG5Hz2Uq7tuwNEhXfYYKj8mJEM_QPpz5jdCK48PnKAjSdjfipqxqMvK8ma6AC8fplwlqLP_5cgXIbu7I3rBN0P"
}  

Properties

Property Type Description

type

String

Must be account_link.

url

String

Authentication callback URL. Must use HTTPS protocol.