Created
November 30, 2017 12:37
-
-
Save helisoncruz/044a793119163a6bec1fbd856b74593e to your computer and use it in GitHub Desktop.
CURL Post PHP Liberação de domínios para Facebook / Whitelisted Domains Facebook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$url = 'https://graph.facebook.com/v2.6/me/messenger_profile?access_token=<seu_access_token>'; | |
$ch = curl_init( $url ); | |
$payload = '{"whitelisted_domains":["https://xml_set_unparsed_entity_decl_handler(parser, handler).com.br"]}'; | |
curl_setopt( $ch, CURLOPT_POSTFIELDS, $payload ); | |
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json')); | |
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); | |
$result = curl_exec($ch); | |
curl_close($ch); | |
echo "<pre>$result</pre>"; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment