Question

I am very new to FQL & I was hoping someone could show me a working example of PHP code used to query using Facebook FQL to list a Facebook pages posts?

Sorry, I am searching without much luck here, I can find the FQL, but I can't figure out how to use it with PHP

A code sample would be really great.

Was it helpful?

Solution

To get all the posts from a page-

SELECT message,description FROM stream WHERE source_id={page-id}

Example

Check the list of fields here.


how to use fql with PHP

Here's how you should use this with PHP-

$params = array(
    'method' => 'fql.query',
    'query' => {query}
);

$result = $facebook->api($params);
print_r($result);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top