.
*/
if (!defined('LACONICA')) { exit(1); }
require_once(INSTALLDIR.'/lib/facebookaction.php');
class FacebooksettingsAction extends FacebookAction
{
function handle($args)
{
parent::handle($args);
if ($this->arg('save')) {
$this->save_settings();
} else {
$this->show_form();
}
}
function save_settings() {
$noticesync = $this->arg('noticesync');
$replysync = $this->arg('replysync');
$facebook = get_facebook();
$fbuid = $facebook->require_login();
$flink = Foreign_link::getByForeignID($fbuid, 2); // 2 == Facebook
$original = clone($flink);
$flink->set_flags($noticesync, $replysync, false);
$result = $flink->update($original);
if ($result) {
echo 'Add an Identi.ca box to my profile
'
.'Allow Identi.ca to update my Facebook status