I have this code:
request({
uri: 'https://graph.facebook.com/v2.6/me/messages',
qs: { access_token: PAGE_ACCESS_TOKEN },
method: 'POST',
json: messageData
})
I'd like to convert that into Perl, what I have so far is:
my $req = HTTP::Request->new( 'POST', 'https://graph.facebook.com/v2.6/me/messages');
$req->header( 'Content-Type' => 'application/json' );
$req->content( $messageData );
I not sure how I can incorporate the following line into my Perl code:
qs: { access_token: PAGE_ACCESS_TOKEN },
It specifies a query parameter to add to the URL.
I tried to search the net but most example either sends the json content or the query string but not both. I need something that can send both if my interpretation to the JavaScript code is correct.
Thanks in advance to anyone who will guide me.