aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-12-27 23:28:34 -0800
committerFriendika <info@friendika.com>2010-12-27 23:28:34 -0800
commitcaf93fffac2aa87966bfafdc8bd7adfd3a07dce8 (patch)
tree8e1a0a93b2f89cd261dbcaed8e0e99ec298ec55b /mod/item.php
parentbdc4cd63e1a80a89c68fe70cb05dd23dcd7f9645 (diff)
downloadvolse-hubzilla-caf93fffac2aa87966bfafdc8bd7adfd3a07dce8.tar.gz
volse-hubzilla-caf93fffac2aa87966bfafdc8bd7adfd3a07dce8.tar.bz2
volse-hubzilla-caf93fffac2aa87966bfafdc8bd7adfd3a07dce8.zip
move facebook post to addon - and under the AGPL
Diffstat (limited to 'mod/item.php')
-rw-r--r--mod/item.php29
1 files changed, 3 insertions, 26 deletions
diff --git a/mod/item.php b/mod/item.php
index 0982bb35d..0a97cdc47 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -377,33 +377,10 @@ function item_post(&$a) {
proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"$notify_type\" \"$post_id\" &",
array(),$foo));
- /**
- * Post to Facebook stream
- */
+ $datarray['id'] = $post_id;
- if((local_user()) && (local_user() == $profile_uid) && (! $private)) {
- $appid = get_config('system', 'facebook_appid' );
- $secret = get_config('system', 'facebook_secret' );
- if($appid && $secret) {
- $fb_post = get_pconfig($local_user(),'facebook','post');
- if($fb_post) {
- require_once('library/facebook.php');
- require_once('include/bbcode.php');
-
- $facebook = new Facebook(array(
- 'appId' => $appid,
- 'secret' => $secret,
- 'cookie' => true
- ));
- try {
- $statusUpdate = $facebook->api('/me/feed', 'post', array('message'=> bbcode($datarray['body']), 'cb' => ''));
- }
- catch (FacebookApiException $e) {
- notice( t('Facebook status update failed.') . EOL);
- }
- }
- }
- }
+ call_hooks('post_local_end', $datarray);
+
goaway($a->get_baseurl() . "/" . $_POST['return'] );
return; // NOTREACHED