开发者

What is essential knowhow for SSL in Rails?

开发者 https://www.devze.com 2023-03-02 01:54 出处:网络
I a开发者_如何学JAVAm learning how to write Ruby on Rails (I have no programming background). I am currently trying to use oauth to connect FourSquare, but I realized that I need an SSL connection t

I a开发者_如何学JAVAm learning how to write Ruby on Rails (I have no programming background).

I am currently trying to use oauth to connect FourSquare, but I realized that I need an SSL connection to make things work (see this issue). I need some basic knowledge to get things done.

The problem: I find my knowledge for SSL in Rails is weak, can anyone give my some links to useful study materials?


Have you tried to use a gem for the foursquare api? I think this seems to be the best solution. https://github.com/ronaldwan/foursquare-api.

Btw, creating a https connection is just defining your url connections staring with https. I encourage you to check out how it is done in the foursquare-api gem. You can find it here: https://github.com/ronaldwan/foursquare-api/blob/master/lib/foursquare_node.rb

Also this file contains a method called def self.exchange_access_token which solves your problem I guess.

0

精彩评论

暂无评论...
验证码 换一张
取 消