Obtaining User's Access Token

5 views
Skip to first unread message

Code Daemon

unread,
May 22, 2011, 7:40:19 PM5/22/11
to mini_fb
I'm using Omniauth + mini_fb. How can I obtain an access token so that
my app can post to the user's Wall?

Travis Reeder

unread,
May 22, 2011, 7:43:50 PM5/22/11
to min...@googlegroups.com
Here's a good place to start: http://intridea.com/2010/10/4/omniauth-flexible-authentication-for-rack?blog=company


On Sun, May 22, 2011 at 4:40 PM, Code Daemon <ryan....@gmail.com> wrote:
I'm using Omniauth + mini_fb. How can I obtain an access token so that
my app can post to the user's Wall?

--
You received this message because you are subscribed to the Google Groups "mini_fb" group.
To post to this group, send email to min...@googlegroups.com.
To unsubscribe from this group, send email to mini_fb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mini_fb?hl=en.


Code Daemon

unread,
May 22, 2011, 8:13:06 PM5/22/11
to mini_fb
Here is how to do it:

In your auth callback: e.g. match '/auth/:provider/callback' =>
'users/authentications#create'

Do this:

omniauth = request.env["omniauth.auth"]
user.authentications.first.access_token = omniauth["credentials"]
["token"] if omniauth['provider'] == 'facebook'






On May 22, 4:43 pm, Travis Reeder <tree...@gmail.com> wrote:
> Here's a good place to start:http://intridea.com/2010/10/4/omniauth-flexible-authentication-for-ra...
Reply all
Reply to author
Forward
0 new messages