我在Facebook开发了一个应用程序,它可以自动在用户的墙上发布内容。但是现在我想每天只发一次,我怎么能这样做呢?
答案 0 :(得分:0)
当您调用api在他/她的墙上发布内容时,也将其保存到数据库中,然后在每次API调用之前检查它
<?php
$uid = $facebook->getUID();
$publishes = mysql_query("SELECT * FROM publishes WHERE uid = ".$uid." AND time > ".(time()-60*60*24);
$publish = mysql_fetch_assoc($publishes);
if (!$publish['time'])
{
//call api and post a post to a wall
}