Closed M425 closed 9 years ago
Also get this error. Appears to be line 302: json = JSON.parse(body);
The body in this case of /picture is not a JSON but an image.
body: GIF89a2 2 � ����������....
One possible solution to this would be to set 'followRedirect' on the request options to false. This would then retrieve the JSON data about the photo along with a url that could be used to fetch it.
got the same error and maked me angry. but i finally found the solution, you should set "redirect" to false.
FB.api('/' + userid + '/picture', {redirect: false, access_token: appToken}, function (res) {
console.log(res);
}
ref: https://developers.facebook.com/docs/graph-api/reference/user/picture
lemortel, you are a life saver! Thanks!
Thank you @lemortel, was having the exact same issue! :)
When I use
always returns
(using graph explorer everything work good)