开发者

Devise : Using Devise Oauth info for facebook interactions

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜