I am trying to access profile data via the Facebook Graph Api like described here:
I have to say. I am very unexperienced with XML.
So this might be a real noob question.
what I get is an XMLElemn which looks like this:
- <<?xml version="1.0" encoding="UTF-8"?>
- <Users_getInfo_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://api.facebook.com/1.0/ http://api.facebook.com/1.0/facebook.xsd" list="true">
- <user>
- <uid>1477411208</uid>
- <first_name>Marc</first_name>
- <last_name>Tiedemann</last_name>
- </user>
- </Users_getInfo_response>/>
looks good to me. but when I try to access the children, i get null back!
instead everything seems to be root!
- println("childs "+ xml.hasChildren());
- println("root "+ xml.getName());
console output:
- childs false
- root <?xml version="1.0" encoding="UTF-8"?>
- <Users_getInfo_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://api.facebook.com/1.0/ http://api.facebook.com/1.0/facebook.xsd" list="true">
- <user>
- <uid>1477411208</uid>
- ...
I also read that this method of getting info from the Graph API is kinda outdated. As REST got depriciated.
Does anybody have a running example of how you could do this better?
As said I am very very new to this kind of coding and happy for any hint's in the right direction.