diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-07-27 13:12:18 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-07-27 13:12:18 -0400 |
commit | 037c35152efc359d0947bff398a56af921afb076 (patch) | |
tree | b6e271640868cf4c0ab9eb6df07fde3a1ef9c6f9 /lib/facebookutil.php | |
parent | 50a343bcf73d7ced643ce40ad31f479d584cb5c1 (diff) | |
parent | 0c8d003d40fb947d2f79398137c039803e0a5966 (diff) |
Merge branch '0.8.x' of git@gitorious.org:laconica/mainline into 0.8.x
Diffstat (limited to 'lib/facebookutil.php')
-rw-r--r-- | lib/facebookutil.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/facebookutil.php b/lib/facebookutil.php index 85077c254..b7688f04f 100644 --- a/lib/facebookutil.php +++ b/lib/facebookutil.php @@ -193,14 +193,16 @@ function facebookBroadcastNotice($notice) $facebook->api_client->users_setStatus($status, $fbuid, false, true); } } catch(FacebookRestClientException $e) { - common_log(LOG_ERR, $e->getMessage()); + + $code = $e->getCode(); + + common_log(LOG_ERR, 'Facebook returned error code ' . + $code . ': ' . $e->getMessage()); common_log(LOG_ERR, 'Unable to update Facebook status for ' . "$user->nickname (user id: $user->id)!"); - $code = $e->getCode(); - - if ($code >= 200) { + if ($code == 200 || $code == 250) { // 200 The application does not have permission to operate on the passed in uid parameter. // 250 Updating status requires the extended permission status_update or publish_stream. @@ -216,7 +218,8 @@ function facebookBroadcastNotice($notice) try { updateProfileBox($facebook, $flink, $notice); } catch(FacebookRestClientException $e) { - common_log(LOG_WARNING, $e->getMessage()); + common_log(LOG_ERR, 'Facebook returned error code ' . + $e->getCode() . ': ' . $e->getMessage()); common_log(LOG_WARNING, 'Unable to update Facebook profile box for ' . "$user->nickname (user id: $user->id)."); |