hi,
i gained a lot of followers lately so,i need the twitter webhook send at every song.
When i put in on 2 minutes interval, sometimes it did not get triggered for 3 - 8 minutes,
so 1 or 2 songs getting not on my twitter feed,is this a twitter or an azuracast problem ?
Thanks
@macbroadcast If you test the webhook while this is happening, you're likely to get a response back from Twitter along the lines of HTTP 420 - Enhance Your Calm, which is their clever way of saying the application rate-limited you automatically and prevented you from sending multiple messages too quickly.
Our built-in rate limiting should help with avoiding that issue.
@SlvrEagle23 No i never saw this error, it mostly said only "A tweet was sent less than 120 seconds ago. Skipping.." but the tweet sometimes did not appear. This for example last tweet

11 minutes later

@macbroadcast That isn't an error message; that's indicating that you set the rate limit to 120 seconds/2 minutes yourself in the webhook configuration. You may want to check that.
@SlvrEagle23 i understand, i set to 2 minutes, a song is between 3-4 minutes so i want to make sure that each song gets captured, or am i wrong?
@macbroadcast Do you not have any tracks that are under or around 2 minutes?
@SlvrEagle23 no, a normal "radio" track is 3:30 - 3:50, so 2 minutes is too short and 5 is too long :smile_cat:
@macbroadcast Right now, unfortunately we don't have an easy way to go back and view the last few webhook dispatch logs for a specific webhook, but the AzuraCast general application log should contain information about why webhooks are having trouble.
Isn't it possible to "detect" the silence between tracks? :smile_cat:
@macbroadcast That would be a bit of a roundabout way of logging webhook dispatches...since we control the dispatch itself, we can just log them to a separate location per-webhook for easier diagnosis.
@macbroadcast Do you still experience this problem?
@Vaalyn yes, but I really can't determine what causes this, today about I had about 1 hour no tweet, when i manually pushing the webhook, it displayed that normal timeout warning, that the tweet was sent allready, but the tweet never arrives and its not because the tweet was too long, which happens sometimes too when i am playing around.
@macbroadcast thanks for updating me on the status.
Let's see if we can get more information about errors out of the WebHooks and add more logging there.
@Vaalyn I have the suspicion that azuracast doesn't display an error when the webhook/tweet is too long.
@macbroadcast I'm not sure what response Twitter sends for that. If it's not causing Guzzle to fail with the TransferException but returns a "valid" response that could be.
@Vaalyn I have a search suggestion and search ban this time https://shadowban.eu/iradioguru , twitter rules for automated tweets are really tough, I need to change a few things again, like removing hashtags and station link, so each tweet has to be as different as possible, i don't have enough listeners to display, would it be difficult to display the duration of the current song in minutes and seconds ? Like song length 3:15 for example? Thanks :blush:
@macbroadcast You can add whatever is available through the Now Playing API response, like I mentioned in #1571.
Just as a thought: Does it really make sense to post every song change to Twitter? How much impact has that to your stations (positive and negative)?
From my perspective Twitter is not really that good for these kinds of updates as most people would classify it as "spam" in their timeline. Personally I would only post Tweets for "DJ is online / offline" or in really specific cases, for example if a playlist with some kind of sponsored content is playing, where posting the song could make sense to promote it. In general though I think posting every song change does more harm than good.
Yeah guess your right,will reduce to every 15 minutes updates and check the impact. I my case i am using the webhook for building followers too, so its a combination from displaying the actual artist/song and as follow helper. That's how I reached 8200 followers in 2 months. :blush:
Just made a test from yesterday afternoon, stopped the webhook and posted just the Show announcements every few hours and my organic tweet exposure which was between 10k and 15k in the last week sank under 1.9k :smile:

@macbroadcast That's to be expected, less Tweets equals less impressions overall on your Tweets. What's really interesting is how many interactions with those Tweets were made by users who saw them.
One example: If you had 10k views before and of those 10k views just 100 interactions with your tweets happened (retweets, likes, clicks, etc.) and now if you have 2k views but let's say 500 interactions that's a lot better than before. Views alone don't say much about the quality or usefulness of a marketing campaign.
Well of course not, don't know if you ever had a look at TweetDeck and see the real-time view, 350.000 tweets are sent per minute, this means you would not even be recognized from active people who have 30k and more followers, so if you told me a few weeks before i would believe it but "spamming" on twitter is relative, more tweets ,more interaction,more exposure, its really that simple, the followers that you lose are the ones that aren't active at all. :smile_cat:
We are probably using Twitter in completely different ways. My understanding of Twitter is the intended purpose it had until it started to become a mindless marketing tool for companies and "social media influencers". So communicating with people who you know, publishing updates that are really relevant to your followers, post informative content relevant to what you do or just status updates of what you are currently doing.
You definitely can use it to just post as much as you can in the hopes of attracting a lot of people but in my opinion the value that you gain from followers who are okay with thousands upon thousands of messages a day is miniscule in comparison with users who really engage with what you post.
Anyways, regarding the original problem of unreliable posting of Tweets if you are okay with some tinkering we could check the response of the requests that are send to Twitter to see if there is anything unusual happening.
There is already a debug log code in place in the Twitter WebHook that can give us some insights to this:
$this->logger->debug(
sprintf('Twitter returned code %d', $response->getStatusCode()),
['response_body' => $response->getBody()->getContents()]
);
In a production environment though this is not logged so you could either override the log level setting for the whole application (which would probably flood your logs) or you could enter the web container with docker exec -it azuracast_web_1 bash then navigate to /var/azuracast/src/Webhook/Connector and edit the Twitter.php so that the code I posted above uses $this->logger->info instead of $this->logger->debug. Then you should start seeing those debug messages in your logs.
ok, it just happened again, changed it to the above code, where can i find the twitter logs, so i can post it here.
@macbroadcast Administration > Logs > AzuraCast application log
@macbroadcast Any updates in regards to the logs?
Seems like , when the message is too long , because of artist name, song name or playlist, it does not display an error :sunglasses:
[2019-06-15 13:32:04] AzuraCast.INFO: New message of type App\Message\UpdateNowPlayingMessage added to queue. [] []
[2019-06-15 13:32:06] AzuraCast.INFO: Handling message of type App\Message\UpdateNowPlayingMessage. [] []
[2019-06-15 13:32:07] AzuraCast.INFO: Twitter returned code 403 {"response_body":"{\"errors\":[{\"code\":186,\"message\":\"Tweet needs to be a bit shorter.\"}]}"} {"station":{"id":1,"name":"iRadio"}}
[2019-06-15 13:32:17] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:32:32] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:32:47] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:33:02] AzuraCast.INFO: Running 1-minute sync task [] []
[2019-06-15 13:33:02] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:33:17] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:33:32] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:33:47] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:34:01] AzuraCast.INFO: Running 1-minute sync task [] []
[2019-06-15 13:34:02] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:34:16] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:34:31] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:34:46] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:35:02] AzuraCast.INFO: Running 5-minute sync task [] []
[2019-06-15 13:35:03] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:35:03] AzuraCast.INFO: Running 1-minute sync task [] []
[2019-06-15 13:35:17] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:35:22] AzuraCast.INFO: New message of type App\Message\UpdateNowPlayingMessage added to queue. [] []
[2019-06-15 13:35:24] AzuraCast.INFO: Handling message of type App\Message\UpdateNowPlayingMessage. [] []
[2019-06-15 13:35:24] AzuraCast.INFO: A tweet was sent less than 600 seconds ago. Skipping... [] {"station":{"id":1,"name":"iRadio"}}
[2019-06-15 13:35:32] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:35:47] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:36:02] AzuraCast.INFO: Running 1-minute sync task [] []
[2019-06-15 13:36:02] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:36:17] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:36:32] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:36:35] AzuraCast.INFO: Running message queue processor for 300 seconds. [] []
[2019-06-15 13:36:47] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:37:01] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:37:02] AzuraCast.INFO: Running 1-minute sync task [] []
[2019-06-15 13:37:16] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:37:31] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:37:46] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:37:52] AzuraCast.INFO: New message of type App\Message\UpdateNowPlayingMessage added to queue. [] []
[2019-06-15 13:37:54] AzuraCast.INFO: Handling message of type App\Message\UpdateNowPlayingMessage. [] []
[2019-06-15 13:37:54] AzuraCast.INFO: A tweet was sent less than 600 seconds ago. Skipping... [] {"station":{"id":1,"name":"iRadio"}}
[2019-06-15 13:38:03] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:38:03] AzuraCast.INFO: Running 1-minute sync task [] []
[2019-06-15 13:38:17] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:38:32] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:38:46] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:38:47] AzuraCast.ERROR: NowPlaying adapter error: Request returned status 400: <b>mount does not exist</b> [] {"station":{"id":1,"name":"iRadio"}}
[2019-06-15 13:38:47] AzuraCast.INFO: A tweet was sent less than 600 seconds ago. Skipping... [] {"station":{"id":1,"name":"iRadio"}}
[2019-06-15 13:38:52] AzuraCast.INFO: New message of type App\Message\UpdateNowPlayingMessage added to queue. [] []
[2019-06-15 13:38:54] AzuraCast.INFO: Handling message of type App\Message\UpdateNowPlayingMessage. [] []
[2019-06-15 13:38:54] AzuraCast.INFO: A tweet was sent less than 600 seconds ago. Skipping... [] {"station":{"id":1,"name":"iRadio"}}
[2019-06-15 13:39:02] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:39:02] AzuraCast.INFO: Running 1-minute sync task [] []
[2019-06-15 13:39:16] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:39:31] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:39:46] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:40:03] AzuraCast.INFO: Running 5-minute sync task [] []
[2019-06-15 13:40:03] AzuraCast.INFO: Running 1-minute sync task [] []
[2019-06-15 13:40:03] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:40:17] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:40:32] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:40:47] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:41:01] AzuraCast.INFO: Running 1-minute sync task [] []
[2019-06-15 13:41:01] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:41:16] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:41:31] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:41:35] AzuraCast.INFO: Running message queue processor for 300 seconds. [] []
[2019-06-15 13:41:46] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:42:02] AzuraCast.INFO: Running 1-minute sync task [] []
[2019-06-15 13:42:02] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:42:16] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:42:31] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:42:46] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:43:01] AzuraCast.INFO: Running Now Playing sync task [] []
[2019-06-15 13:43:01] AzuraCast.INFO: Running 1-minute sync task [] []``
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
@macbroadcast You can add whatever is available through the Now Playing API response, like I mentioned in #1571.
Just as a thought: Does it really make sense to post every song change to Twitter? How much impact has that to your stations (positive and negative)?
From my perspective Twitter is not really that good for these kinds of updates as most people would classify it as "spam" in their timeline. Personally I would only post Tweets for "DJ is online / offline" or in really specific cases, for example if a playlist with some kind of sponsored content is playing, where posting the song could make sense to promote it. In general though I think posting every song change does more harm than good.