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

/{user-id}/picture node error #126

Open
ahmedosama94 opened this issue Dec 30, 2017 · 1 comment
Open

/{user-id}/picture node error #126

ahmedosama94 opened this issue Dec 30, 2017 · 1 comment

Comments

@ahmedosama94
Copy link

ahmedosama94 commented Dec 30, 2017

I get an error with code JSONPARSE SyntaxError: Unexpected token � in JSON at position 0, when trying to get the node /{user-id}/picture. I may probably be because the response object is given with a data key? I am not sure of course. I am instead using the /{user-id} endpoint with a fields parameter with picture like so: /{user-id}?fields=picture.

@dmitrijs-balcers
Copy link

Found a solution:

FB.api(
  '4/picture?redirect=false',
  {fields: 'url', redirect: false},
  function(response) {
    console.log(response);
    // Insert your code here
  }
);

This should work.

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