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

Validation failed #117

Open
nishantt12 opened this issue Sep 9, 2016 · 4 comments
Open

Validation failed #117

nishantt12 opened this issue Sep 9, 2016 · 4 comments

Comments

@nishantt12
Copy link

Receiving validation failed at:

FB.setAccessToken(accessToken);
FB.api('/me', function (data) {
if (data && data.error) {
if (data.error.code === 'TIMEDOUT') {
return Errors.errorCustom(res, 'FACEBOOK TOKEN TIMEOUT');
} else {
return Errors.errorCustom(res, data.error);
}
} else {

}

});
}

Error: { [ValidationError: User validation
message: 'User validation failed',
name: 'ValidationError',
errors:
{ name:
{ [ValidatorError: Path name
message: 'Path name is req
name: 'ValidatorError',
properties: [Object],
kind: 'required',
path: 'name',
value: undefined } } }
{ [ValidationError: User validation
message: 'User validation failed',
name: 'ValidationError',
errors:
{ name:
{ [ValidatorError: Path name
message: 'Path name is req
name: 'ValidatorError',
properties: [Object],
kind: 'required',
path: 'name',
value: undefined } } }

Even though /me API is working fine at the client side. Any specify reason why I am receiving validation failed?

@dantman
Copy link

dantman commented Sep 9, 2016

  • Have you configured the appID and secret?
  • What is the stack trace?

Also, you should update; The 0.7.x are obsolete and the Thuzi repo is unmaintained.

@nishantt12
Copy link
Author

I have added appId and Secret on the client side.

@nishantt12
Copy link
Author

Stack trace:

{ [ValidationError: User validation failed]
message: 'User validation failed',
name: 'ValidationError',
errors:
{ name:
{ [ValidatorError: Path name is required.]
message: 'Path name is required.',
name: 'ValidatorError',
properties: [Object],
kind: 'required',
path: 'name',
value: undefined } } }
{ [ValidationError: User validation failed]
message: 'User validation failed',
name: 'ValidationError',
errors:
{ name:
{ [ValidatorError: Path name is required.]
message: 'Path name is required.',
name: 'ValidatorError',
properties: [Object],
kind: 'required',
path: 'name',
value: undefined } } }

@dantman
Copy link

dantman commented Sep 9, 2016

I'm not asking about client side, Facebook's official client SDK has nothing to do with this node API library, configuring Facebook's SDK will not configure this library. You have to configure appId and the secret with FB.options.

You also should not be configuring your app secret client side, that is a security issue.

Additionally, that is not a stack trace. Stack traces have filenames and line numbers for the call stack at the point where the error was generated.

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

2 participants