Telegram API: answerCallbackQuery's "text" is not optional? (documentation states it is) - telegram

I seems that "text" argument of the answerCallbackQuery API request is not optional, even though the documentation states it is:
Text String Optional Text of the notification. If not specified,
nothing will be shown to the user, 0-200 characters
It also says:
NOTE: After the user presses a callback button, Telegram clients will
display a progress bar until you call answerCallbackQuery. It is,
therefore, necessary to react by calling answerCallbackQuery even if
no notification to the user is needed (e.g., without specifying any of
the optional parameters)
That is exactly what I'm trying to do, but alas I receive the error "Bad Request: MESSAGE_EMPTY" if "text" property is omitted. I can't believe that I'm the only one who has stumbled over this problem. Therefore I strongly suspect that I'm doing something wrong here. Can you please help?
I don't want notification to be shown on click because the reaction to click is going to be sent as the message, briefly after the click. Also it seems that other bots have no such problem, for example the BotFather.
Also, does anyone know a forum or another place where I can get a support regarding the API?

I think it is optional for text parameter yet.
I tried this request, and no error shown.
You can join #BotTalk group which is created by Telegram Support Force, and ask if others have same problem.

It seems that it was a temporary bug that was fixed in the same day.
Thanks to Sean for advising #BotTalk where problem was resolved.

Related

Google Analytics 4 measurement protocol not working

I tried to send event to Google Analytics 4 using the postman.
And GA4 just response 204 No Content and the event is not recorded in the data stream.
I checked the measurement_id and api_secret has right value.
Is there anything wrong?
Thank you.
I encountered this issue today.
For me personally, it turns out I was looking for my received data in the wrong place: I was looking in Admin > Data Streams, which incorrectly told me "No data received in past 48 hours."
Where I actually needed to look was in the "Realtime Overview" (Reports > Realtime - see picture):
In there, there was a handy little event counter that showed me my events were, in fact, getting through just fine.
If you check here and it's still zero, here are some other things to try:
You may need to set the Content-Type header to "application/json".
Validate your events by sending them to the endpoint https://www.google-analytics.com/**debug**/mp/collect rather than https://www.google-analytics.com/**debug**/mp/collect - as long as you get "validationMessages": [] back, you should be good to go.
Make sure the JSON you're sending matches this format
According to the folks over at this similar StackOverflow question, You may need to set the User-Agent header, though I personally did not have to.
The object should be payload, not body.
Try to see this video: https://youtu.be/WSxdrG1G_yE

Custom events in Firebase

I know this has been discussed a lot on SO, but even based on the previous questions and answers I still can't quite understand the details of how event logging is really supposed to work in Firebase.
Let's say somewhere in my code I have this:
FirebaseAnalytics mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
Bundle bundle = new Bundle();
bundle.putInt("card_id", 912);
mFirebaseAnalytics.logEvent("card_open", bundle);
Do I understand correctly that the "card open" even should now appear in Firebase Console with the "card_id" parameter?
Then I click More > Edit parameter reporting, enter the name of the parameter I added in my code, and it should appear on the list.
I have read the docs several times, but I still can't get it. Can I not even use any of the events and parameters provided by FirebaseAnalytics.Param and FirebaseAnalytics.Event and just send custom events/parameters (within the known limits, of course).
Another question is whether the limit on the number of global parameters force you to use Big Query?
Thank you!
You're correct. You should see the card_open event with card_id parameter in the analytics console.
Note that there's a delay in the analytics reporting, about 4 to 6 hours after it was logged and uploaded by the device.
Just to ensure that your implementation is correct. I mean, to verify that the events, parameters and user properties are logged in the right time and the right place correctly, use the DebugView console.
I also believe that you should be able see the card_id parameter in the custom reporting for card_open event, considering the delay in the reporting.
For your last question, the parameter limit is on a project level perspective now, compared before that it was per app. Parameters with the same name across different apps will be counted as 1. Not sure, maybe Firebase would like us (developers) to use the parameters accordingly.

theForm.__EVENTVALIDATION

theForm.__EVENTVALIDATION.value
I got this: What does it mean? And how to encode it?
"jSp677t39HyhECAmULmdU/ya3EVJgkk8dokDchVgxoH1wOfuygSJwIY8Nxw+5+Le3r3JZ49UYhuxPKvdaGyMv1JyCPLXT0tWnpJryLqScc8a5QCNfiRu5ufIEjsqOCKdGMFTd33wdI3QJM2+ElSwe9V7K/8HiEXBYwvR/bXh8Xvrtkh8XspsxF0ADYMnzWTlUvk0ODQRofXwlYcAfUZ4wuzjG+X1b2G4mjON1zYPO6c4TGlofRap39VyxZ6RX2pBYLtcwahOUo6nX4zD7ICJeSu4mkIoo/W5eW9qWRClbEWgA6NZs/dyTlT/TB9q7xtx/ghBfogHOddtsOWQxSQzyFcz0xYLOKdtqbf6uzpwgBz3vBsbevNoXwG0KIjCz+fxW8yaEzpcywZBAxJV4vzXRLFu39Mti5PHXpGJ0C7iEQ7Vc2Ema9sNNF1wpCzdc0j50+tXhw=="
The event validation feature is designed to minimize the risk of an attacker tampering with values that are posted back to the server. A brief description of the feature can be found at http://msdn.microsoft.com/en-us/library/system.web.ui.page.enableeventvalidation.aspx. Lots of blog posts on this feature if you search http://www.bing.com/search?q=event+validation.
As for the field value, it is an opaque string. It is not meant to be decipherable by the application.

How do I sort feeds returned from Google Reader?

When I query Google Reader for the list of subscriptions for a user, it seems to be returned in a fixed order, no matter what the order is as shown at google.com/reader.
(see http://www.google.com/reader/api/0/subscription/list for the list I'm talking about)
Each subscription returns a 'sortid', which Google Reader uses when the user rearranges subscriptions, by sending back a concatenation of all sortids in the new order after rearranging is finished. However, that sortid never changes.
So my question is this: How do I actually get the order the subscriptions are supposed to be in? I've been using http://code.google.com/p/pyrfeed/wiki/GoogleReaderAPI as a reference, but it is lacking in this department, and I haven't found anything anywhere else either.
I've found the answer:
http://www.google.com/reader/api/0/preference/stream/list

ASP.NET Variable issues

I have some terribly written ASP.NET code that is just not working right (go figure).
I'm charged with maintaining and bug fixing this code, but I can barely make head or high water of it
Unfortunately I don't have the time to rewrite it.
If someone could help this would be great:
(the code): given to you here (some minimal obfuscation necessary):
http://mastergeektheater.com/issues.txt
What it's supposed to do:
Receives an order from a shopping cart application, and creates a table of textboxes based on the quantity of said object ordered.
Once the whole thing is validated (submit_Click()), then it reveals a div with further instructions and grays out the input fields so you can still see what was entered, but can't affect anymore. Emails are sent to each inputted email address.
What it actually does:
Receives the order, and correctly displays the inputs. On Submit, all of the "required field validators fire - if they are Vaild, then the comparison validators fire. SOMEWHERE AROUND HERE, it all goes south."
All of the input areas in the table except the first user disappear. if the comparisons success, then it postsback, and the first user is there (greyed out) and the other users are gone. if the comparisons fail, then it doesn't successfully postback, and stays on the input form, but all of the input fields except the first user still disappear
I know this is a little too specific to be a really well formed Stack Overflow question, but I've tried to break it down to things I think were wrong and I asked other questions that were more specific to try to fix it. Unfortunately, it hasn't worked. The code got better, but the whole thing is still broken. At this point I'm desperate.
If anyone could help, it would be a huge lifesaver. Thanks in advance for all of you who pour through this terrible code (and terrible question) for even a minute...
I guess the problem could be due to this line.
Session["quantity"] =(null != Request["quantity1"]) ? Request["quantity1"].ToString() : "1";
Do you have a field (hidden/input) named quantity1 on the form?
Is it being passed to querystring or as part of form item collection?
It will be 1 (when the form posts back to itself) & hence the loop will only run once.

Resources