Auto Generating a Facebook parametric code & save image to folder

Can someone please help me I wan’t to auto create a FB QR code and save image to a folder. Have read this from FB developers page but have no idea implementing it in a php script

Generating a parametric code :-

curl -X POST -H "Content-Type: application/json" -d '{
  "type": "standard",
  "data": {
    "ref":"billboard-ad"
  },
  "image_size": 1000
}' "https://graph.facebook.com/v2.6/me/messenger_codes?access_token=<ACCESS_TOKEN>"

and api response:-

{ 
  "uri": "<YOUR_CODE_URL_HERE>"
}

just use the CURL implementation of PHP

http://php.net/manual/en/book.curl.php

You can try using Guzzle for this

Or you try a wrapper class for CURL, e.g.

https://ourcodeworld.com/articles/read/648/top-7-best-curl-wrapper-libraries-for-php

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.