messenger-sdk-php icon indicating copy to clipboard operation
messenger-sdk-php copied to clipboard

Error -1005 Invalid Argument Error - yahoo IM send_message

Open yappkey opened this issue 12 years ago • 1 comments

Hello, Trying to send a message, I get this error:

1005,"detail":"Invalid Argument Error"

Could someone please show me how to fix it?

Thank you so much.

Below is the information which was sent to yahoo server (in the form of: $url, 'post', $header, $postdata):

http://developer.messenger.yahooapis.com/v1/message/yahoo/a_tim?oauth_consumer_key=dj0yJmk9...&realm=yahooapis.com&oauth_nonce=6078207...&oauth_signature=5b7b...036c%264e0a...6aa&oauth_signature_method=PLAINTEXT&oauth_timestamp=1344417169&oauth_token=A%3D5hV.HX....8.o_99y_zk&oauth_version=1.0&sid=KbJa...T6A5, 'post', Array, {"message" : test ccc cccc}

yappkey avatar Aug 08 '12 10:08 yappkey

I am not sure if the OP here is still trying to fix this issue, but for anyone who comes here from a google search:

Add double quotes around the $message variable, line 242.

So your line should look like this: $postdata = '{"message" : "'. $message. '"}';

Instead of this: $postdata = '{"message" : '. $message. '}';

Small typographical error in in the SDK that you download from here at GitHub. That should get you up and running!

rdmccoy avatar Sep 09 '12 10:09 rdmccoy