4
I’m trying to get the Facebook cover of the logged-in user, but I’m not succeeding.
FB.login(function(response){
if(response.authResponse){
FB.api('/me', function(fb){
var email = fb.email;
var nasc = fb.birthday;
var nome = fb.name;
var genero = fb.gender;
var local = fb.hometown;
var idUser = fb.id;
FB.api('/'+idUser+'?fields=source', function(resp){
console.log(resp);
return false;
});
I’m doing as it is in the Facebook documentation, but it doesn’t work.
Object {error: Object} error: Object code: 100 message: "(#100) Tried accessing nonexisting field (source) on node type (User)" type: "OAuthException"
I got it. I put cover in the Parameter. But there is no Doc. Or I read it wrong.
FB.api('/'+idUser+'/?fields=cover', function(resp){
console.log(resp);
return false;
});
Answer your question with your solution and accept that answer so it stays with Solved ;)
– MoshMage