Buffer: Support for app.net is removed
parent
1c50441cb9
commit
93a766cdfb
|
@ -191,6 +191,9 @@ function buffer_settings(App $a, &$s)
|
||||||
$s .= '<input id="buffer-delete" type="checkbox" name="buffer_delete" value="1" />';
|
$s .= '<input id="buffer-delete" type="checkbox" name="buffer_delete" value="1" />';
|
||||||
$s .= '</div><div class="clear"></div>';
|
$s .= '</div><div class="clear"></div>';
|
||||||
|
|
||||||
|
// The callback URL is the script that gets called after the user authenticates with buffer
|
||||||
|
$callback_url = $a->get_baseurl() . '/buffer/connect';
|
||||||
|
|
||||||
$buffer = new BufferApp($client_id, $client_secret, $callback_url, $access_token);
|
$buffer = new BufferApp($client_id, $client_secret, $callback_url, $access_token);
|
||||||
|
|
||||||
$profiles = $buffer->go('/profiles');
|
$profiles = $buffer->go('/profiles');
|
||||||
|
@ -303,14 +306,6 @@ function buffer_send(App $a, array &$b)
|
||||||
$send = false;
|
$send = false;
|
||||||
|
|
||||||
switch ($profile->service) {
|
switch ($profile->service) {
|
||||||
case 'appdotnet':
|
|
||||||
$send = ($b["extid"] != NETWORK_APPNET);
|
|
||||||
$limit = 256;
|
|
||||||
$markup = false;
|
|
||||||
$includedlinks = true;
|
|
||||||
$htmlmode = 6;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'facebook':
|
case 'facebook':
|
||||||
$send = ($b["extid"] != NETWORK_FACEBOOK);
|
$send = ($b["extid"] != NETWORK_FACEBOOK);
|
||||||
$limit = 0;
|
$limit = 0;
|
||||||
|
@ -373,15 +368,9 @@ function buffer_send(App $a, array &$b)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Seems like a bug to me
|
// Seems like a bug to me
|
||||||
// Buffer doesn't add links to Twitter and App.net (but pictures)
|
// Buffer doesn't add links to Twitter (but pictures)
|
||||||
if (($profile->service == "twitter") && isset($post["url"]) && ($post["type"] != "photo")) {
|
if (($profile->service == "twitter") && isset($post["url"]) && ($post["type"] != "photo")) {
|
||||||
$post["text"] .= " " . $post["url"];
|
$post["text"] .= " " . $post["url"];
|
||||||
} elseif (($profile->service == "appdotnet") && isset($post["url"]) && isset($post["title"]) && ($post["type"] != "photo")) {
|
|
||||||
$post["title"] = Plaintext::shorten($post["title"], 90);
|
|
||||||
$post["text"] = Plaintext::shorten($post["text"], $limit - (24 + strlen($post["title"])));
|
|
||||||
$post["text"] .= "\n[" . $post["title"] . "](" . $post["url"] . ")";
|
|
||||||
} elseif (($profile->service == "appdotnet") && isset($post["url"]) && ($post["type"] != "photo")) {
|
|
||||||
$post["text"] .= " " . $post["url"];
|
|
||||||
} elseif ($profile->service == "google") {
|
} elseif ($profile->service == "google") {
|
||||||
$post["text"] .= html_entity_decode(" ", ENT_QUOTES, 'UTF-8'); // Send a special blank to identify the post through the "fromgplus" addon
|
$post["text"] .= html_entity_decode(" ", ENT_QUOTES, 'UTF-8'); // Send a special blank to identify the post through the "fromgplus" addon
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue