开发者

Devise : Using Devise Oauth info for facebook interactions

开发者 https://www.devze.com 2023-01-17 01:10 出处:网络
I have gotten Oauth working with Devise and my users are happily logging inusing their Facebook accounts. I would开发者_开发问答 like to allow the users to \"like\" certain things on my site and post

I have gotten Oauth working with Devise and my users are happily logging in using their Facebook accounts. I would开发者_开发问答 like to allow the users to "like" certain things on my site and post stuff back to their profiles. How do I do that using the information I have (seemingly only an encrypted_password and password_salt)?


In my case, I request offline_access permission from Facebook. Every time when the user login, I store his Facebook access_token (graph API) to our user record. So we can use the access_token to post something to user's Facebook wall anytime.


You need the stream_publish permission and you should check the documentation on how to do this. In order to allow users to 'like' content on your site you should use the appropriate opengraph meta tags on your content, as described here.

0

精彩评论

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

关注公众号