Giter Site home page Giter Site logo

line / line-liff-starter Goto Github PK

View Code? Open in Web Editor NEW
137.0 28.0 201.0 11 KB

This is a small web application that demonstrates the basic functionality of the LINE Front-end Framework (LIFF).

License: MIT License

HTML 39.72% PHP 1.93% JavaScript 50.56% CSS 7.79%
line javascript

line-liff-starter's Introduction

⚠️ This repository is no longer active

This repository is no longer actively maintained. Please refer line/line-liff-v2-starter for this repository successor.

LIFF Starter App

This is a small web application that demonstrates the basic functionality of the LINE Front-end Framework (LIFF).

Prerequisites

Deploying the application

Deploy

  1. Click the above "Deploy to Heroku button".
  2. Fill in the required information on the "Create a New App" page in Heroku.
  3. Select Deploy app and confirm that your app is successfully deployed.
  4. Record the app URL (https://{Heroku app name}.herokuapp.com). You will set this URL when you add the app to LIFF.

Adding the starter app to LIFF

Add the app to LIFF. For more information, see Adding a LIFF app.

Running the application

  1. To run this application, host these files on a web server.
  2. Set your LIFF's entryUrl to point to index.html.
  3. Open your LIFF in the LINE app.

Trying it out

To open the LIFF app within the LINE app, follow the steps below.

  1. Tap line://app/{liffId} on the chat screen of the LINE app. {liffId} is the LIFF app ID returned to the API request to add the app to LIFF.

  2. Agree to grant the required permissions to the LIFF app.

  3. When opening the LIFF app, the following four buttons and the content of received information are displayed.

    • Open Window: Opens https://line.me in the in-app browser of the LINE app.
    • Close Window: Closes the LIFF app.
    • Get Access Token: Gets the current user's access token.
    • Get Profile: Gets the current user's profile.
    • Send Messages: Sends a sample message on behalf of the user if the LIFF app is opened in the chat screen.

For API calls associated with the buttons, see Calling the LIFF API. For the received information, see Initializing the LIFF app.

Checking logs

To get more information, you can check the logs of your app using Heroku CLI.

  1. Log in to Heroku from the command line.

    $ heroku login
  2. Check the logs.

    $ heroku logs --app {Heroku app name} --tail

Downloading and making changes to the starter app

You can download the starter app to your local machine to test and make changes for yourself. You can then deploy the app to a web server of your choice. Here, we'll look at how to make and deploy changes to the Heroku app you created in the previous step.

  1. Make sure you have the following installed

  2. Clone the line-liff-starter GitHub repository.

    git clone https://github.com/line/line-liff-starter.git
  3. cd into your Git directory.

  4. Add a remote for Heroku to your local repository.

    $ heroku git:remote -a {Heroku app name}
  5. Make edits and commit changes (optional).

    $ git add .
    $ git commit -m "First commit"
  6. Push changes to Heroku master.

    $ git push heroku master
    
    

line-liff-starter's People

Contributors

coffeephile avatar mrmaakun avatar sugarshin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

line-liff-starter's Issues

cannot register line liff

{
"timestamp": 1529037030098,
"status": 500,
"error": "Internal Server Error",
"exception": "java.lang.NullPointerException",
"message": "No message available",
"path": "/liff/v1/apps"
}

Is it possible to push LIFF message to user ?

Hello there, thanks for the great kit !

Wondering something, all examples I've seen involve a user clicking on a liff link on chat.

I was wondering if it is possible to push a LIFF view to a user ? without the user pushing a liff link ?

Like, if I have a button, with action as uri and the link as the liff link, would it open the liff page when button pushed ?

thanks !

I can't get query string from url at LIFF

I used the let urlParams = new URLSearchParams(window.location.search);
to get parameter from LIFF.
However, it is undefined, do you know how to get query string from LIFF ?

Liff init returns unexpected error

I am using liff v2 2.4.0 and line app v10.16.0 on android 10

Whenever I am initializing liff I am getting error as unable to open the URL unexpected error occurred.

Network Error

Getting Error said Network Error when sending message or get profile.

Send Message in Liff return 403

I use QRCode reader in line to open a liff, then the liff tried to send message via liff-send-messages

but it alway return 403,

Otherwise, if I click the link directly, the liff will work fine and send message successfully.
I have already tried created a new liff and created a new channel, but it still not be resolved.

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.