Parse Facebook API data using loop for getting fan page ID#s?
Posted
by
Brandon Lee
on Stack Overflow
See other posts from Stack Overflow
or by Brandon Lee
Published on 2010-12-31T19:52:50Z
Indexed on
2010/12/31
20:54 UTC
Read the original article
Hit count: 332
facebook-graph-api
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?
© Stack Overflow or respective owner