Rails 3 - Log into another site and keep cookie in session

后端 未结 1 1197
醉话见心
醉话见心 2021-01-14 02:05

I\'m putting together a small app which will allow a user to log into a semi-popular social networking site that doesn\'t have a sufficient API, so I\'m using the mechanize

相关标签:
1条回答
  • 2021-01-14 02:29

    Don't store the agent, just the session cookie. Find the name of the cookie you want to capture. After logging in, grab it from the Mechanize cookie jar, store it in the session, and make sure it's in the cookie jar before every "API request".

    0 讨论(0)
提交回复
热议问题