Comments (9)
Could you use "\n"
instead of '\n'
?
from line-bot-sdk-php.
@moznion sry my last reply not posted, error in my internet connection
"\n"
worked like a charm
is there any clue for new bubble ?
let me try call replyText twice
thank you
from line-bot-sdk-php.
@rebornishard
You can reply multi messages up to 5 (please see: https://devdocs.line.me/en/#reply-message).
This SDK provides helper method to do that. Please refer MultiMessageBuilder.
from line-bot-sdk-php.
thanks, gotten into that,
i tried with it and fail,
but worked on dev acc
another one fail in TextMessageBuilder
i use this :
$textMessageBuilder = new \LINE\LINEBot\MessageBuilder\TextMessageBuilder('hello');
$response = $bot->replyMessage('<reply token>', $textMessageBuilder);
if ($response->isSucceeded()) {
echo 'Succeeded!';
return;
}
// Failed
echo $response->getHTTPStatus . ' ' . $response->getRawBody();
result :
object(LINE\LINEBot\Response)#184 (3) {
["httpStatus":"LINE\LINEBot\Response":private]=>
int(400)
["body":"LINE\LINEBot\Response":private]=>
string(100) "{"message":"The property, 'messages[0].text', in the request body is invalid (line: 1, column: 84)"}"
["headers":"LINE\LINEBot\Response":private]=>
array(12) {
["Server"]=>
string(5) "nginx"
["Content-Type"]=>
string(30) "application/json;charset=UTF-8"
["X-Line-Request-Id"]=>
string(36) "70ed586b-7734-4aa6-ab34-322681aeb4d3"
["X-Content-Type-Options"]=>
string(7) "nosniff"
["X-XSS-Protection"]=>
string(13) "1; mode=block"
["X-Frame-Options"]=>
string(4) "DENY"
["Content-Length"]=>
string(3) "100"
["Expires"]=>
string(29) "Thu, 02 Feb 2017 18:43:37 GMT"
["Cache-Control"]=>
string(29) "max-age=0, no-cache, no-store"
["Pragma"]=>
string(8) "no-cache"
["Date"]=>
string(29) "Thu, 02 Feb 2017 18:43:37 GMT"
["Connection"]=>
string(5) "close"
}
}
where i can found this one :
string(100) "{"message":"The property, 'messages[0].text', in the request body is invalid (line: 1, column: 84)"}"
i can do it well using simple mode :
$response = $bot->replyText('<reply token>', 'hello!');
i do it like this :
$messageD = data['message'];
$textMessageBuilder = new \LINE\LINEBot\MessageBuilder\TextMessageBuilder($messageD);
$response = $bot->replyMessage('<reply token>', $textMessageBuilder);
if ($response->isSucceeded()) {
echo 'Succeeded!';
return;
}
// Failed
echo $response->getHTTPStatus . ' ' . $response->getRawBody();
this on isn't worked, but :
$messageD = $data['message'];
$response = $bot->replyText('<reply token>', $messageD);
running so well
What I already did
-
Create New Subdomain -- fail, same error
-
Apply it on different server -- fail, same error
thank you
here from another server :
object(LINE\LINEBot\Response)#177 (3) {
["httpStatus":"LINE\LINEBot\Response":private]=>
int(400)
["body":"LINE\LINEBot\Response":private]=>
string(100) "{"message":"The property, 'messages[0].text', in the request body is invalid (line: 1, column: 84)"}"
["headers":"LINE\LINEBot\Response":private]=>
array(12) {
["Server"]=>
string(5) "nginx"
["Date"]=>
string(29) "Thu, 02 Feb 2017 23:44:42 GMT"
["Content-Type"]=>
string(30) "application/json;charset=UTF-8"
["Transfer-Encoding"]=>
string(7) "chunked"
["Connection"]=>
string(10) "keep-alive"
["X-Line-Request-Id"]=>
string(36) "32d3c627-5174-47a3-92d2-c21c326c0cc9"
["X-Content-Type-Options"]=>
string(7) "nosniff"
["X-XSS-Protection"]=>
string(13) "1; mode=block"
["Cache-Control"]=>
string(46) "no-cache, no-store, max-age=0, must-revalidate"
["Pragma"]=>
string(8) "no-cache"
["Expires"]=>
string(1) "0"
["X-Frame-Options"]=>
string(4) "DENY"
}
}
from line-bot-sdk-php.
@rebornishard
I could not reproduce this problem. Could you show us more details?
from line-bot-sdk-php.
@rebornishard If there is no reply within one week, this issue will be closed.
from line-bot-sdk-php.
@moznion i use webhook from my other project and worked,
sry for late reply i must rebuild it from scratch, no problem after running it for 3 days
and now i want to try MultiMessageBuilder
can i use it like this
text
image
text
audio
text
with MultiMessageBuilder ?
thank you @moznion
from line-bot-sdk-php.
Please refer: https://github.com/line/line-bot-sdk-php/blob/e16d9ca/tests/LINEBot/SendMultiMessageTest.php#L80
from line-bot-sdk-php.
And please refer to the wiki page: https://github.com/line/line-bot-sdk-php/wiki/Sending-multiple-messages
from line-bot-sdk-php.
Related Issues (20)
- [Feature Request] Send multiple messages at once. HOT 2
- Flex Message Update 3 released
- Webhook redelivery HOT 1
- Confirm template has location button is not working HOT 2
- Automatic opening and closing of the rich menu when tapping a rich menu HOT 1
- Added "inputoOption" property to action object HOT 2
- Validate rich menu object HOT 1
- [Bug Report] Placing required parameters after optional parameters is deprecated HOT 1
- [Bug Report] ImageSet event without index/total make Undefined index access HOT 3
- Dependency Dashboard
- fix(ci): set-output in Github Actions to be deprecated
- Validating message objects HOT 1
- [Feature Request] Enable to set `trackingId` via `VideoMessageBuilder` HOT 1
- Get content transcoding status and a preview image HOT 1
- @All in the mention property of the webhooks HOT 1
- [Feature Request] Automatically generate code with github actions when renovate updates
- Add doc
- CI should run openapi-generator, and run test after it
- Methods of Event class are not suggested HOT 1
- [Bug Report] The `php artisan vendor:publish` command not working in Laravel application
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from line-bot-sdk-php.