Parse Facebook API data using loop for getting fan page ID#s?
- by Brandon Lee
I've been learning how to parse json data returned from the facebook-api. I've figured out how to fetch fan pages from a specific profile id and want to parse them using a loop!
Heres the code and example I have below:
This is the data I get back from the facebook-api
Array ( [0] => Array (
[page_id] => XXXXXX60828 ) [1] => Array (
[page_id] => XXXXXX0750 ) [2] => Array (
[page_id] => XXXXXX91225 ) [3] => Array (
[page_id] => XXXXXX1960343 ) [4] => Array (
[page_id] => XXXXXX60863 ) [5] => Array (
[page_id] => XXXXXX8582 ) )
I need to be able to put this data in a loop and extract the page_id#s out... still getting familiar with json and am having issues figuring this out?
How can I get this in a loop using for each and strip out the page id#s?