D
D
dStetskij2017-07-25 21:49:35
PHP
dStetskij, 2017-07-25 21:49:35

How can I send private messages to facebook and ok.ru using cURL php?

It is necessary to implement in the online store a notification on social networks of people about the delivery of the order to the point of issue.
In vk did this:

$vktoken = 'tipToken';
$vkuid = 'tipPoluchatel';
$vkmessage = 'tipMessage';
$vkurl ="https://api.vk.com/method/messages.send?access_token=".$vktoken."&message=".$vkmessage."&uid=".$vkuid."&v=3&captcha_sid=&captcha_key=";
vkcurl( $vkurl );
function vkcurl( $url ) {
    $ch = curl_init( $url );
    curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
    curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, false );
    curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
    $response = curl_exec( $ch );
    curl_close( $ch );
}

Use on health. Actually, that's the question - how to implement something similar with Facebook and classmates? I will be very grateful to those who help)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita Dergachov, 2017-07-25
@vanillathunder

It's all in the documentation

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question