My requested URL is https://api.instagram.com/v1/media/MYMEDIA_ID/comments?access_token=MYTOKEN&text=MYTEXT
I get a reply like this:
{
meta = {
code = 400;
"error_message" = "Missing 'text'";
"error_type" = APIInvalidParametersError;
};
}
In the Instagram document it says the comment API takes two parameters: text
and access_token
. I have provided both, and I get the error saying text
is missing.
I have tried with different symbols instead of &
but nothing works. Does anybody have experience on how the text
parameter should appear on the requested URL?
Thanks a lot !
i am using hybridauth, and here is the code, it is working..
function setUserComment($post_id, $message)
{
$flag = 0;
$parameters = array("text" => $message);
$response = $this->api->post( "media/$post_id/comments", $parameters );
// check the last HTTP status code returned
if ( $this->api->http_code != 200 ){
throw new Exception( "Comment failed! {$this->providerId} returned an error. " . $this->errorMessageByStatus( $this->api->http_code ) );
}
else{
$flag = 1;
}
return $flag;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With