Comments (12)
What are you storing? Once you use the oauth code to get a facebook session, you need to store the session info and discard the token.
Mike
On Dec 10, 2012, at 4:12 AM, derri [email protected] wrote:
Hi All
I can login using facebooker2, and on my home page I use current_facebook_user but I get error "This authorization code has been used." Mogli::Client::OAuthException.
a few month ago it doesn't happen.
any body can help me?
—
Reply to this email directly or view it on GitHub.
from facebooker2.
Hey Mike, This is the same error I am getting. I think it's because Facebook changed some stuff recently. This is my stack trace that I posted on Mogli.
/Users/alexandrecarriere/.bundler/ruby/1.8/mogli-b8f68b5d7e44/lib/mogli/client.rb:79:in `raise_error_by_type_and_message'
/Users/alexandrecarriere/.bundler/ruby/1.8/mogli-b8f68b5d7e44/lib/mogli/client.rb:70:in `raise_client_exception'
/Users/alexandrecarriere/.bundler/ruby/1.8/mogli-b8f68b5d7e44/lib/mogli/client.rb:52:in `create_from_code_and_authenticator'
/Users/alexandrecarriere/.bundler/ruby/1.8/facebooker2-504cc261af61/lib/facebooker2/rails/controller.rb:231:in `oauth2_fetch_client_and_user_from_cookie'
/Users/alexandrecarriere/.bundler/ruby/1.8/facebooker2-504cc261af61/lib/facebooker2/rails/controller.rb:221:in `oauth2_fetch_client_and_user'
/Users/alexandrecarriere/.bundler/ruby/1.8/facebooker2-504cc261af61/lib/facebooker2/rails/controller.rb:16:in `current_facebook_user'
app/controllers/application_controller.rb:31:in `current_user'
app/controllers/users_controller.rb:28:in `show'
from facebooker2.
Hi Mike for until a few month ago it still work, i can login and i can fetch current_facebook_user, now i just can login but can't fetch current_facebook_user, i try to remove fbsr cookies but it just remove the cookie and still can't fetch current_faebook_user.
I just add facebooker2 and authlogic_facebook_connect together. it's work before.
from facebooker2.
You should be able to get it once per login. Once you exchange the auth code for a token, you'll need to store the token and rebuild the user from that.
Mike
On Dec 10, 2012, at 7:56 PM, derri [email protected] wrote:
Hi Mike for until a few month ago it still work, i can login and i can fetch current_facebook_user, now i just can login but can't fetch current_facebook_user, i try to remove fbsr cookies but it just remove the cookie and still can't fetch current_faebook_user.
I just add facebooker2 and authlogic_facebook_connect together. it's work before.
—
Reply to this email directly or view it on GitHub.
from facebooker2.
Same problem form me
mogli (0.0.36) lib/mogli/client.rb:79:in raise_error_by_type_and_message' mogli (0.0.36) lib/mogli/client.rb:70:in
raise_client_exception'
mogli (0.0.36) lib/mogli/client.rb:52:in create_from_code_and_authenticator' (eval):2:in
send'
(eval):2:in current_facebook_user' app/views/layouts/_menu_user_right.html.erb:8 /data/groupsale/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/method_tracer.rb:392:in
render'
/data/groupsale/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/method_tracer.rb:191:in trace_execution_scoped' /data/groupsale/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/method_tracer.rb:387:in
render'
/data/groupsale/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/method_tracer.rb:392:in render_partial' /data/groupsale/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/method_tracer.rb:191:in
trace_execution_scoped'
/data/groupsale/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/method_tracer.rb:387:in render_partial' app/views/layouts/_menu.html.erb:21 /data/groupsale/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/method_tracer.rb:392:in
render'
/data/groupsale/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/method_tracer.rb:191:in trace_execution_scoped' /data/groupsale/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/method_tracer.rb:387:in
render'
/data/groupsale/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/method_tracer.rb:392:in render_partial' /data/groupsale/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/method_tracer.rb:191:in
trace_execution_scoped'
/data/groupsale/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/method_tracer.rb:387:in render_partial' app/views/layouts/home.html.erb:56 /data/groupsale/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/method_tracer.rb:392:in
render'
/data/groupsale/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/method_tracer.rb:191:in trace_execution_scoped' /data/groupsale/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/method_tracer.rb:387:in
render'
app/controllers/pages_controller.rb:143:in home' /data/groupsale/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:255:in
perform_action'
/data/groupsale/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/method_tracer.rb:191:in trace_execution_scoped' /data/groupsale/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.1.0/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:248:in
perform_action'
warden (0.10.7) lib/warden/manager.rb:35:in call' warden (0.10.7) lib/warden/manager.rb:35:in
call'
warden (0.10.7) lib/warden/manager.rb:34:in catch' warden (0.10.7) lib/warden/manager.rb:34:in
call'
/data/groupsale/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.1.0/lib/new_relic/rack/browser_monitoring.rb:18:in call' devise (1.0.11) lib/devise/rails/warden_compat.rb:43:in
call'
How can i solve?
from facebooker2.
I just pushed a completely untested change that should cache the required info. Can you try running with the facebooker2 from git to see if that fixes things?
from facebooker2.
I install it as plugin,this is what I get:
ActionView::TemplateError (Constant Facebooker2::Rails::Controller::Moglie from facebooker2/rails/controller/moglie.rb not found
Constant Facebooker2::Rails::Moglie from facebooker2/rails/moglie.rb not found
Constant Facebooker2::Moglie from facebooker2/moglie.rb not found
Constant Moglie from moglie.rb not found) on line #17 of themes/dappled/views/shared/_user_menu.html.haml:
from facebooker2.
I just fixed the type. Can you try again?
Mike
On Dec 12, 2012, at 10:36 AM, derri [email protected] wrote:
I install it as plugin,this is what I get:
ActionView::TemplateError (Constant Facebooker2::Rails::Controller::Moglie from facebooker2/rails/controller/moglie.rb not found
Constant Facebooker2::Rails::Moglie from facebooker2/rails/moglie.rb not found
Constant Facebooker2::Moglie from facebooker2/moglie.rb not found
Constant Moglie from moglie.rb not found) on line #17 of themes/dappled/views/shared/_user_menu.html.haml:—
Reply to this email directly or view it on GitHub.
from facebooker2.
I get this :
undefined method `sign_in_user_and_client' for #BaseController:0xc2ee850
there a typo lib/facebooker2/rails/controller.rb line 234
if i change it to fb_sign_in_user_and_client it's work fine
from facebooker2.
i'm sorry when I try to logout and try to sign in again, this i what I get:
Mogli::Client::OAuthException (Error validating access token: The session is invalid because the user logged out.):
from facebooker2.
I added an fb_logout! method that you can call when that error is raised. You should be able to call that and then go through the login process.
Mike
On Dec 12, 2012, at 10:51 AM, derri [email protected] wrote:
i'm sorry when I try to logout and try to sign in again, this i what I get:
Mogli::Client::OAuthException (Error validating access token: The session is invalid because the user logged out.):
—
Reply to this email directly or view it on GitHub.
from facebooker2.
It's work for now, I'll check it again tomorrow
Thanks Mike
from facebooker2.
Related Issues (20)
- oauth based login with facebooker2 passing app_id for all values HOT 7
- how to find out if user has logged out of FB? HOT 7
- Dependency on mogli 0.0.33 HOT 2
- Errno::ETIMEDOUT: Connection timed out - connect(2) HOT 4
- rails 3 escapes output (needs .html_safe) HOT 8
- OAuth2 not working HOT 8
- Make it really default to oauth2 HOT 1
- undefined method `reset_key' for nil:NilClass HOT 1
- login rendering twice HOT 1
- hashie dependency HOT 2
- IE issues ? HOT 3
- IE8: Unable to get value of the property 'appendChild': object is null or undefined HOT 2
- gsub exception in Rails 3.2.3 HOT 1
- 40-80 sec. wait for current_facebook_user on one app HOT 2
- Facebook token expiration isssue HOT 12
- undefined method `tr' for nil:NilClass
- cannot login to FB HOT 2
- Facebook live api HOT 1
- End
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from facebooker2.