Using the sample app for rpx_now
gem ( http://github.com/grosser/rpx_now_example) on localhost:3000, I have successfully logged in via Google Accounts, myOpenID, Yahoo, but cannot make it via Facebook.
In the RPX app/widget settings I have set my facebook-app key and secret. In my facebook app settings, the Connect URL is myappname.rpxnow.com
. But when I try to connect, then I don't even see a facebook login page, just a number of redirects and I am back to my localhost with the following exception http://gist.github.com/386520 .
Before I was successfully connecting with oauth2
gem, however, without fetching user data - only authentication. That time I set only key/secret and localhost
as my Connect URL. Currently, I don't even ask for email etc., but still the same problem.
Can it happen because rpx_now
cannot get requested user data from facebook? Or it is a problem of facebook key/secret? May be I need to provide more settings of my facebook app?
RPXNow::ApiError in UsersController#create
Got error: Invalid parameter: token (code: 1), HTTP status: 200
RAILS_ROOT: /home/Andrei/rpx_now_example
Application Trace | Framework Trace | Full Trace
/usr/lib/ruby/gems/1.8/gems/rpx_now-0.6.20/lib/rpx_now/api.rb:71:in `parse_response'
/usr/lib/ruby/gems/1.8/gems/rpx_now-0.6.20/lib/rpx_now/api.rb:21:in `call'
/usr/lib/ruby/gems/1.8/gems/rpx_now-0.6.20/lib/rpx_now.rb:23:in `user_data'
/home/Andrei/rpx_now_example/app/controllers/users_controller.rb:16:in `create'
Request
Parameters:
None
Show session dump
R开发者_如何学Pythonesponse
Headers:
{"Content-Type"=>"",
"Cache-Control"=>"no-cache"}
In order to solve it, one needs to go to Facebook application, click "Edit Settings", select "Migrations" on the left column and toggle "New Data Permissions" to disabled. There is a comment next to this parameter: Enable the new data permissions and the new permissions dialog. (Migration ends on: June 1, 2010)
So, I guess one needs to update rpx_now
gem to work with the new interface.
精彩评论