Question Details

Get Link Line Linking Account not work

I'm working on a feature linking account of application and Line account (Rails project). I implement my code step by step as document here Everything works perfect. But I face a trouble at step 4: Generate a nonce and redirect the user to the LINE Platform When I access this link from browser, It works fine:{link token}&nonce={nonce}

But when I try to access it by Faraday gem, it did not work:

response = Faraday.get("{link token}&nonce=#{nonce}")
response.status # 302
response.["x-frame-options"] # "DENY, DENY"

Why It did not work and is there any way to active this link by code (not by paste into browser)?

Thank you for your hepl!

Edited: 10 months ago
Profile picture
Le Chi Nguyen


Profile picture
Curry Doria
Posted: 10 months ago

You need to follow 302 redirects. You can use the FaradayMiddleware::FollowRedirects. Please refer this page:

Are you sure? question.vm