Search code examples
facebook-graph-apipoststreamfeedfacebook-wall

Graph API: Check if app already posted in the past x days before creating a wall post?


I would like to post to the user wall, but I want to limit the posts my app makes to max 1 per day or week.

Can I check how many posts my app made so far in the past day / week or do I need to store this on my side?


Solution

  • You can filter the FQL stream table by app_id.

    Combine that with source_id (ID of user the wall belongs to) and created_time greater than 1 day / 1 week in the past, and LIMIT 1.

    If you get a result, then there was a post made through your app in the specified time range.