0

I need to get informations about fan pages shared by some user, i.e. :

  1. fan page id
  2. url (optional)
  3. when the fan pages was shared by some user (example: creation_time)

For example: SELECT fan_page_id, url, creation_time FROM [some_table] WHERE uid = me() I know that the select should be more complicated :)

I will just add, I need only data about facebook fan pages shared by some user, no all links. Very important for me is when that happend (creation_time).

Summary: Which fan pages, by whom and when was shared :)

4

1 回答 1

0

Try this

SELECT post_id, via_id, created_time, description, type,attachment FROM stream WHERE source_id=me()AND strpos(description,'shared a page')>=0 

You'll get the shared pages by the logged user, the timestamp when it was shared and the description ('User_Name shared a page: Page_Name.').

This condition on the where clause, is the responsible for filtering the share page posts by the user:

strpos(description,'shared a page')>=0

Will look for posts that have that substring on it

The attachment field returns info about the page, but unfortunately and although in the docs it says it returns the id of the object shared, with pages that doesn't seem to work.

You can read more about the stream table and the available fields here: https://developers.facebook.com/docs/reference/fql/stream

于 2013-07-16T15:46:24.400 回答