• Welcome to RadioDJ - Free Radio Automation Software Forum. Please log in or sign up.

Twitter

Started by MrMix, January 13, 2021, 11:50:39 AM

MrMix

Buongiorno a tutti e buon anno !
I posts che vengono fatti su Twitter (#nowplaying) penso siano fatti in automatico tramite qualche plugin.
In DJ 2.0.0.6 trovo un plugin 4.2.0.0 Now Playing Info Exporter che potrebbe/dovrebbe fare questi tipi di annunci/posts.
Ho visto che Funky Corner Radio (Plauri) fa questi posts.
C'è una guida per il settaggio ?
Se questo plugin non dovesse essere quello giusto ce n'è uno di terzi ?
Grazie e saluti
MM

maury81bs

Quote from: MrMix on January 13, 2021, 11:50:39 AM
Buongiorno a tutti e buon anno !
I posts che vengono fatti su Twitter (#nowplaying) penso siano fatti in automatico tramite qualche plugin.
In DJ 2.0.0.6 trovo un plugin 4.2.0.0 Now Playing Info Exporter che potrebbe/dovrebbe fare questi tipi di annunci/posts.
Ho visto che Funky Corner Radio (Plauri) fa questi posts.
C'è una guida per il settaggio ?
Se questo plugin non dovesse essere quello giusto ce n'è uno di terzi ?
Grazie e saluti
MM

potrebbero essere fatti con IFTTT ?

stevewa

you need a twitter api account to do auto posting on twitter.
do you have that? the twitter api signup process is difficult, if you answer their questions wrong, they will deny you access to the api, bcuz they are trying to stop evil robot posters.

plauri

Quote from: MrMix on January 13, 2021, 11:50:39 AM
Buongiorno a tutti e buon anno !
I posts che vengono fatti su Twitter (#nowplaying) penso siano fatti in automatico tramite qualche plugin.
In DJ 2.0.0.6 trovo un plugin 4.2.0.0 Now Playing Info Exporter che potrebbe/dovrebbe fare questi tipi di annunci/posts.
Ho visto che Funky Corner Radio (Plauri) fa questi posts.
C'è una guida per il settaggio ?
Se questo plugin non dovesse essere quello giusto ce n'è uno di terzi ?
Grazie e saluti
MM
Ciao, io li faccio tramite la piattaforma di autopo.st (che è a pagamento e che offre anche altri servizi), però esiste la possibilità ad esempio con lo streaming di shoutca.st di configurare un plugin incluso nel prezzo dello streaming.
Funky Corner Radio
Radiodj v.2.0.4.5 (Windows 10)
http://www.funkycorner.radio
https://www.funkycorner.it
http://www.radiofunkycorner.com

MrMix

Grazie, penso che vedrò l'opzione autopost.st, le altre sono fuori portata economica.

MM

radiosoundfm

My method,

With codebird and twitter api.

Now Playing Info makes the text file localy on drive
With task schedule every 15 minutes a .bat file
a ftp to upload txt file to webserver
in bat file a call to php file on server to starts codebird

upload.bat
winscp.com /ini=nul /script=ftp_upload.txt
ping 127.0.0.1 -n 8 -l 0
callurl "https://iventi.nu/some folder/posting.php"
exit


ftp_upload.txt
open ftp://ftp user:ftp password/
cd some folder

rm *.txt
put nowplaying.txt



bye


Codebird Posting on webserver
<?php
// require codebird
require_once('codebird.php');
 
\
Codebird\Codebird::setConsumerKey("TWITTER API KEY""ANOTHER KEY");
$cb = \Codebird\Codebird::getInstance();
$cb->setToken("SOME TOKEN""ANOTHER TOKEN");


$file_artist file_get_contents('some folder/nowplaying.txt'true);



// these files to upload. You can also just upload 1 image!
$media_files = [
  
'../'
];
// will hold the uploaded IDs
$media_ids = [];

foreach (
$media_files as $file) {
  
// upload all media files
  
$reply $cb->media_upload([
    
'media' => $file
  
]);
  
// and collect their IDs
  
$media_ids[] = $reply->media_id_string;
}

// convert media ids to string list
$media_ids implode(','$media_ids);

// send Tweet with these medias
$reply $cb->statuses_update([
  
'status' => "Recently played: " $file_artist " #italo #iventi #nowplaying http://iventi.nu",
  
'media_ids' => $media_ids
]);
print_r($reply);

$reply $cb->statuses_update($params);

?>


Some Folder is a location on webserver.

Use codebird documentation to understand key's and token's from twitter api.

DON'T SPAM TWITTER, that's why i use a time limit of 15 minutes.