base 64 URL decode with Ruby/Rails?

Posted by seth.vargo on Stack Overflow See other posts from Stack Overflow or by seth.vargo
Published on 2011-01-17T00:40:17Z Indexed on 2011/01/17 0:53 UTC
Read the original article Hit count: 350

Filed under:
|
|
|
|

I am working with the Facebook API and Ruby on Rails and I'm trying to parse the JSON that comes back. The problem I'm running into is that Facebook base64URL encodes their data. There is no built-in base64URL decode for Ruby.

For the difference between a base64 encoded and base64URL encoded, see wikipedia.

How do I decode this using Ruby/Rails?

Edit:

Because some people have difficulty reading - base64 URL is DIFFERENT than base64

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby