Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: Invalid OAuth access token signature. #10

Open
sebpiq opened this issue May 17, 2013 · 11 comments
Open

error: Invalid OAuth access token signature. #10

sebpiq opened this issue May 17, 2013 · 11 comments

Comments

@sebpiq
Copy link

sebpiq commented May 17, 2013

Hi!

I am trying to get started; and I have this very simple code :

var Facebook = require('facebook-node-sdk')

var facebook = new Facebook({
    appID: 'my app id',
    secret: 'my app secret'
})

facebook.api('/me', function(err, data) {
  console.log(err, data)
})

I don't know what's the problem, but I keep getting this error :

{ result: 
   { error: 
      { message: 'Invalid OAuth access token signature.',
        type: 'OAuthException',
        code: 190 } },
  code: 0,
  message: 'Invalid OAuth access token signature.' }

did I miss something very basic?

@leftieFriele
Copy link

I get the same error and I've tried resetting the secret key without any luck

@BaseInfinity
Copy link

Don't forget to set your access token.

var facebook = new Facebook({
    appID: 'my app id',
    secret: 'my app secret'
}).setAccessToken('access token');

@sebpiq
Copy link
Author

sebpiq commented May 26, 2013

@BaseInfinity how do you get this access token? In my app page I have only the id and the secret.

@awm33
Copy link

awm33 commented May 27, 2013

Had this issue too. Did what @BaseInfinity said.

@sebpiq Go to https://developers.facebook.com/docs/facebook-login/access-tokens/

For an App access token

GET /oauth/access_token?
client_id={app-id}
&client_secret={app-secret}
&grant_type=client_credentials

@Troush
Copy link

Troush commented May 27, 2013

https://developers.facebook.com/docs/howtos/login/login-as-app/:

“Because it requires you to include your App Secret you should not attempt to make this call client-side as that would expose this secret to all your app users. It is important that your App Secret is never shared with anyone. For this reason, this call should be performed server-side”

And for the app access token, it’s the same – you should never use it client-side, because every user could spot it there and then start using it to perform actions on behalf of your app (or change many of your app’s settings).

If you have a server-side part to your application, you can simply “build” the app access token there yourself, concatenating app id and secret with a pipe symbol, app_id|app_secret.

@gilesgoodwin
Copy link

The issue is the param 'appID' should be 'appId':
appID: 'my app id',

@mjpizz
Copy link

mjpizz commented Nov 17, 2013

Just ran into this too - it looks like the README example has the wrong capitalization

@paulbrzeski
Copy link

OMG! Thanks for pointing out the capitalization issue!

I was grinding my teeth dreading having to jerry rig some kind of GET token request and wondered why this lib didn't just do it... this explanation makes a lot more sense :P

elie222 added a commit to elie222/meteor-facebook-node-sdk that referenced this issue Sep 17, 2014
The facebook-node-sdk page has a typo in it. See the bottom of this page: amachang/facebook-node-sdk#10
@KouSyurei
Copy link

I don't know me by AccessToken getCurrentAccessToken () method to get the token is a token of the APP or the user's token, through "https://graph.facebook.com/debug_token? Access_token = {My AppId} | {CMy AppSecret} & input_token = {AccessToken. GetCurrentAccessToken () access token} "the interface returned My token validation error of this information.

@noor2096
Copy link

noor2096 commented Sep 3, 2019

I am facing this issue, can anyone help me with this please
E/flutter (17544): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: PlatformException(login_in_progress, loginWithReadPermissions called while another Facebook login operation was in progress., null)
E/flutter (17544): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:564:7)
E/flutter (17544): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:316:33)
E/flutter (17544):
E/flutter (17544): #2 FacebookLogin.logInWithReadPermissions (package:flutter_facebook_login/flutter_facebook_login.dart:106:23)E/flutter (17544):
E/flutter (17544): #3 _FBLoginState._logIn (package:fb_login/fbLogin.dart:18:34)
E/flutter (17544):
E/flutter (17544): #4 _FBLoginState.build. (package:fb_login/fbLogin.dart:94:19)
E/flutter (17544): #5 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:635:14)
E/flutter (17544): #6 _InkResponseState.build. (package:flutter/src/material/ink_well.dart:711:32)
E/flutter (17544): #7 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
E/flutter (17544): #8 TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:365:11)
E/flutter (17544): #9 TapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:275:7)
E/flutter (17544): #10 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:455:9)
E/flutter (17544): #11 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:75:13)
E/flutter (17544): #12 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:102:11)
E/flutter (17544): #13 _WidgetsFlutterBinding&BindingBase&GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:218:19)
E/flutter (17544): #14 _WidgetsFlutterBinding&BindingBase&GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22)
E/flutter (17544): #15 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:156:7)
E/flutter (17544): #16 _WidgetsFlutterBinding&BindingBase&GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:102:7)
E/flutter (17544): #17 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:86:7)
E/flutter (17544): #18 _rootRunUnary (dart:async/zone.dart:1136:13)
E/flutter (17544): #19 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
E/flutter (17544): #20 _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
E/flutter (17544): #21 _invoke1 (dart:ui/hooks.dart:250:10)
E/flutter (17544): #22 _dispatchPointerDataPacket (dart:ui/hooks.dart:159:5)
E/flutter (17544):
D/SecWifiDisplayUtil(17544): Metadata value : none
D/ViewRootImpl(17544): #1 mView = com.android.internal.policy.PhoneWindow$DecorView{22b7774 I.E...... R.....I. 0,0-0,0}
D/mali_winsys(17544): new_window_surface returns 0x3000, [1440x2560]-format:1
D/ViewRootImpl(17544): MSG_RESIZED_REPORT: ci=Rect(0, 96 - 0, 0) vi=Rect(0, 96 - 0, 0) or=1
W/DisplayListCanvas(17544): DisplayListCanvas is started on unbinded RenderNode (without mOwningView)
I/Timeline(17544): Timeline: Activity_idle id: android.os.BinderProxy@db25b6b time:12090929
I/Timeline(17544): Timeline: Activity_launch_request id:com.facebook.katana time:12091149
V/ActivityThread(17544): updateVisibility : ActivityRecord{51825e4 token=android.os.BinderProxy@8c7c57f {com.example.fb_login/com.example.fb_login.MainActivity}} show : true
V/ActivityThread(17544): updateVisibility : ActivityRecord{845543f token=android.os.BinderProxy@db25b6b {com.example.fb_login/com.facebook.FacebookActivity}} show : true
I/Timeline(17544): Timeline: Activity_idle id: android.os.BinderProxy@8c7c57f time:12091661
D/ViewRootImpl(17544): #3 mView = null
I/System.out(17544): (HTTPLog)-Static: isSBSettingEnabled false
I/System.out(17544): (HTTPLog)-Static: isSBSettingEnabled false
V/ActivityThread(17544): updateVisibility : ActivityRecord{51825e4 token=android.os.BinderProxy@8c7c57f {com.example.fb_login/com.example.fb_login.MainActivity}} show : true
W/System.err(17544): remove failed: ENOENT (No such file or directory) : /data/user/0/com.example.fb_login/files/AppEventsLogger.persistedevents
I/System.out(17544): (HTTPLog)-Static: isSBSettingEnabled false
I/System.out(17544): (HTTPLog)-Static: isSBSettingEnabled false

@xiehongxin
Copy link

I am facing this issue, can anyone help me with this please
E/flutter (17544): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: PlatformException(login_in_progress, loginWithReadPermissions called while another Facebook login operation was in progress., null)
E/flutter (17544): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:564:7)
E/flutter (17544): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:316:33)
E/flutter (17544):
E/flutter (17544): #2 FacebookLogin.logInWithReadPermissions (package:flutter_facebook_login/flutter_facebook_login.dart:106:23)E/flutter (17544):
E/flutter (17544): #3 _FBLoginState._logIn (package:fb_login/fbLogin.dart:18:34)
E/flutter (17544):
E/flutter (17544): #4 _FBLoginState.build. (package:fb_login/fbLogin.dart:94:19)
E/flutter (17544): #5 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:635:14)
E/flutter (17544): #6 _InkResponseState.build. (package:flutter/src/material/ink_well.dart:711:32)
E/flutter (17544): #7 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
E/flutter (17544): #8 TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:365:11)
E/flutter (17544): #9 TapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:275:7)
E/flutter (17544): #10 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:455:9)
E/flutter (17544): #11 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:75:13)
E/flutter (17544): #12 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:102:11)
E/flutter (17544): #13 _WidgetsFlutterBinding&BindingBase&GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:218:19)
E/flutter (17544): #14 _WidgetsFlutterBinding&BindingBase&GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22)
E/flutter (17544): #15 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:156:7)
E/flutter (17544): #16 _WidgetsFlutterBinding&BindingBase&GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:102:7)
E/flutter (17544): #17 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:86:7)
E/flutter (17544): #18 _rootRunUnary (dart:async/zone.dart:1136:13)
E/flutter (17544): #19 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
E/flutter (17544): #20 _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
E/flutter (17544): #21 _invoke1 (dart:ui/hooks.dart:250:10)
E/flutter (17544): #22 _dispatchPointerDataPacket (dart:ui/hooks.dart:159:5)
E/flutter (17544):
D/SecWifiDisplayUtil(17544): Metadata value : none
D/ViewRootImpl(17544): #1 mView = com.android.internal.policy.PhoneWindow$DecorView{22b7774 I.E...... R.....I. 0,0-0,0}
D/mali_winsys(17544): new_window_surface returns 0x3000, [1440x2560]-format:1
D/ViewRootImpl(17544): MSG_RESIZED_REPORT: ci=Rect(0, 96 - 0, 0) vi=Rect(0, 96 - 0, 0) or=1
W/DisplayListCanvas(17544): DisplayListCanvas is started on unbinded RenderNode (without mOwningView)
I/Timeline(17544): Timeline: Activity_idle id: android.os.BinderProxy@db25b6b time:12090929
I/Timeline(17544): Timeline: Activity_launch_request id:com.facebook.katana time:12091149
V/ActivityThread(17544): updateVisibility : ActivityRecord{51825e4 token=android.os.BinderProxy@8c7c57f {com.example.fb_login/com.example.fb_login.MainActivity}} show : true
V/ActivityThread(17544): updateVisibility : ActivityRecord{845543f token=android.os.BinderProxy@db25b6b {com.example.fb_login/com.facebook.FacebookActivity}} show : true
I/Timeline(17544): Timeline: Activity_idle id: android.os.BinderProxy@8c7c57f time:12091661
D/ViewRootImpl(17544): #3 mView = null
I/System.out(17544): (HTTPLog)-Static: isSBSettingEnabled false
I/System.out(17544): (HTTPLog)-Static: isSBSettingEnabled false
V/ActivityThread(17544): updateVisibility : ActivityRecord{51825e4 token=android.os.BinderProxy@8c7c57f {com.example.fb_login/com.example.fb_login.MainActivity}} show : true
W/System.err(17544): remove failed: ENOENT (No such file or directory) : /data/user/0/com.example.fb_login/files/AppEventsLogger.persistedevents
I/System.out(17544): (HTTPLog)-Static: isSBSettingEnabled false
I/System.out(17544): (HTTPLog)-Static: isSBSettingEnabled false

1. Can you describe the situation where you have this problem?

2. What is your version of flutter_facebook_login?

3. Can you post your source code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests