aboutsummaryrefslogtreecommitdiffstats
path: root/addon
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-06-02 00:52:26 -0700
committerFriendika <info@friendika.com>2011-06-02 00:52:26 -0700
commit558962169ffe947906703f179d81aabccbd84a24 (patch)
tree2603eb9683fc10a080a28eb8bf9dee97021f1cee /addon
parent55e727de648cc932fb849f01c5dbda350ad7ad5e (diff)
downloadvolse-hubzilla-558962169ffe947906703f179d81aabccbd84a24.tar.gz
volse-hubzilla-558962169ffe947906703f179d81aabccbd84a24.tar.bz2
volse-hubzilla-558962169ffe947906703f179d81aabccbd84a24.zip
warning message if Facebook post does not succeed. It happens quite a lot.
Diffstat (limited to 'addon')
-rw-r--r--addon/facebook/facebook.php24
1 files changed, 14 insertions, 10 deletions
diff --git a/addon/facebook/facebook.php b/addon/facebook/facebook.php
index dc1aa02dd..00098a7dd 100644
--- a/addon/facebook/facebook.php
+++ b/addon/facebook/facebook.php
@@ -624,19 +624,23 @@ function facebook_post_hook(&$a,&$b) {
// "test_mode" prevents anything from actually being posted.
// Otherwise, let's do it.
- if(! get_config('facebook','test_mode'))
+ if(! get_config('facebook','test_mode')) {
$x = post_url($url, $postvars);
- $retj = json_decode($x);
- if($retj->id) {
- q("UPDATE `item` SET `extid` = '%s' WHERE `id` = %d LIMIT 1",
- dbesc('fb::' . $retj->id),
- intval($b['id'])
- );
+ $retj = json_decode($x);
+ if($retj->id) {
+ q("UPDATE `item` SET `extid` = '%s' WHERE `id` = %d LIMIT 1",
+ dbesc('fb::' . $retj->id),
+ intval($b['id'])
+ );
+ }
+ else {
+ // FIXME queue the message so we can attempt to redeliver, see include/notifier.php and include/queue.php
+ notice( t('Facebook delivery failed.') . EOL);
+ }
+
+ logger('Facebook post returns: ' . $x, LOGGER_DEBUG);
}
-
- logger('Facebook post returns: ' . $x, LOGGER_DEBUG);
-
}
}
}