Hi,
This is yet another post related to Facebook API. In this I will be demonstrating how to make a wall post in multiple Facebook page of which you are an admin or a fan. A similar functionality I had posted in one of my previous post regarding posting in friends wall. In this also the basic idea is same. The main factor here is to generate the Facebook page list for the logged in user.
First we need yo understand the FQL(Facebook Query Language). Here we will be working with two tables, "page" and "page_admin". The page table is the master table and page_admin holds the mapping between Facebook user and the pages. Here is the query that I am using to fetch the list of pages:
$query="select page_id, name, pic_small, type from page where type<>'APPLICATION' and page_id in (select page_id from page_admin where uid =" . $uid . ")";
Here is how the page looks:
Explanation: