Giter Club home page Giter Club logo

Comments (8)

Naufal-FR avatar Naufal-FR commented on July 17, 2024

@sandmanzz Are you using full blown API or the tiny version of it ?
It seems you're trying to use the full version but with the tiny version codes which is different.

from line-bot-sdk-php.

sandmanzz avatar sandmanzz commented on July 17, 2024

hmmm, what you mean by full blown and tiny ? maybe we have different perception.

from line-bot-sdk-php.

Naufal-FR avatar Naufal-FR commented on July 17, 2024

@sandmanzz If you import the LineBotTiny.php from this to your project, then you're using the tiny version of this API.

If you use composer as stated in README then that means you're using the full version of the API

from line-bot-sdk-php.

sandmanzz avatar sandmanzz commented on July 17, 2024

@Naufal-FR i use from http://uzulla.hateblo.jp/entry/2016/10/07/164740 , it seems combine bot tiny and full

from line-bot-sdk-php.

Naufal-FR avatar Naufal-FR commented on July 17, 2024

@sandmanzz Well, it's kinda out off topic if you use outside codes but i'll assume it's the full version by the looks of it.

As stated in the error log you need to create a MessageBuilder object first that holds your messages and then passing it into the replyMessage function.

This codes below will create an object holding two message,
$myMessages = new \LINE\LINEBot\MessageBuilder\TextMessageBuilder('First', 'Second');

You'll then pass the variable name (which is $myMessages) into the replyMessage function,
$bot->replyMessage('<reply token>', $myMessages);

Your original codes uses the tiny version structure which is not needed because the full version has TextMessageBuilder classes to create you messages.

from line-bot-sdk-php.

sandmanzz avatar sandmanzz commented on July 17, 2024

owh i see.. okay..
thanksfull
but can we send different object ?
ex text and image

from line-bot-sdk-php.

Naufal-FR avatar Naufal-FR commented on July 17, 2024

@sandmanzz You can by changing TextMessageBuilder into other classes depending on your need. For example if you want an image use ImageMessageBuilder instead of TextMessageBuilder. Although you need to note that different classes requires different parameter to works. You can see the full list of classes here and the examples from the API documentation.

from line-bot-sdk-php.

sandmanzz avatar sandmanzz commented on July 17, 2024

thanks you save my day

from line-bot-sdk-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.