Telegram status tracker bot using telethon - telegram-bot

I've found this TelegramOnlineSpy on github, followed the instructions on the README
page and tried to create my own bot. The problem is whenever I try to "monitor" anyone's status I find it UserStatusRecently(). However, "monitoring" my own status (the same phone number that I logged in with to start the script session) works perfectly and I get notified whenever I open/close telegram. I even tried checking my other phone number and while I'm ACTIVE on telegram, the account.status is still UserStatusRecently(). Can anyone explain to me what is going on?

Related

Telegram bot: uploading new features without rebooting bot

I have telegram bot written in Python with lot's of users. The question is: when I do some changes (for example adding new inline buttons to bot) all users need to reset it or to use '/start' command. How to make this process hidden, not to ask all users do it? Maybe there is a variant, when bot restarts itself by schedule? Every suggestion will be really valuable for me....

Facebook audience bidding is not working: bundle status is invalid

I have a react native application on IOS, and I implemented Facebook Audience Network Bidding with Admob.
Everything looks fine; bidding requests are being sent from Admob to Facebook. But Facebook is barely responding to bid requests.
When I use the debugger, there is an error called "Bundle status is invalid" with zero documentation on the internet.
I can see test ads without any problems. I used the Ad Inspector to validate everything, and it looks fine. But production users are not able to see any Facebook ads.
SDK versions:
FBAudienceNetwork 6.2.1
Google-Mobile-Ads-SDK 7.69.0
GoogleMobileAdsMediationFacebook 6.2.1.0
GoogleMobileAdsMediationTestSuite 1.4.0
Is there any knowledge about this problem and what is "Bundle status is invalid"?
After trying lots of solutions, I think I found out the reason.
The problem was missing tax information.
Step by step solution
Go to monetization manager
Click payouts
Select your payment account
Click edit account
It should navigate you to the organization management page.
Click to payout settings
Now, you will see the missing tax information and an update button.
Download your appropriate tax form from here
Complete the form, print it, sign it then scan it.
Upload the completed form using the update button.
After few hours, it should work and you can see the "Bundle status is invalid" is gone from the debugger.
If this solution works for you, please add a comment. So I can be sure about giving the correct solution, I will mark it as an answer.
I resolved this issue by releasing the updated app on the store (google play store in my case), now the debugger shows all green ticks.
edit: just to clarify that I still haven't uploaded a tax info form, ill wait to see if its mandatory first.

APISubscriptionError 400 Unable to reach callback URL

I found a lot of posts about this issue, but none is like mine.
I have a website that subscribes to IG real-time updates. Since some time ago trying to subscribe to new notifications returns the above error. Seems like IG can't reach the callback_url.
Interesting findings while troubleshooting:
I tried to manually (directly) access the callback_url and it works flawlessly.
When I run the site on my local machine and make sure the callback_url is to my server + the verify_token is a valid one then it all works as it should! IG reaches the callback_url.
I used the apigee console to make the subscription request and there it sometimes works.. Meaning - I craft the request to IG API and click Send. If it fails then I click again (I don't change parameters) and then it works..
Web server logs are in line with the results I get (when it complains it can't reach then there's no log of a request).
Does anyone have any tip or suggestion how to fix this?
Thanks!
While chasing my own tail for a solution I also contacted IG support. I described the issue using same description as above.
After 2 weeks suddenly everything started working again. Magic! Suddenly no errors at all! Needless to say nothing has changed on my end (hardware / network / code).
I didn't receive any response from their support, but considering that a previous email to them a few months ago took about 2 weeks to answer then I am quite sure some support guy simply fixed the issue on their side and didn't even bother to let me know what was going on.
This could be related to the fact that they killed most of their real time notifications API.
Anyway, leaving this here so that if anyone encounters a similar issue then just know you may need to email IG support.

Telegram bot and the method getUpdates

I have a question about Telegram bot, I created a bot some weeks ago, it works fine but there is a strange behavior with the method getUpdates; indeed if I use the link:
https://api.telegram.org/bot<token>/getUpdates
now I can't see any message, but if I start a new bot this link works fine like the first day when I created the other bot.
There is a particular interval of time after which this link stops working?
There is a way to re-enable it?
Thanks in advance
From Telegram Bot API documentations:
Incoming updates are stored on the server until the bot receives them
... but they will not be kept longer than 24 hours.
So, getUpdates did not stop working. Old messages got deleted after a finite amount of time.
Use #BOtFather And /revoke command to Get New Token for your bot.
I had an issue with my bot API were it mysteriously crashes. I found it was due to it returning this HTML page instead of a JSON string very rarely. Even though the getUpdates interval was a fair 3 seconds. I've patched an update not long ago.
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.10.1</center>
</body>
</html>
The only time the bot token becomes useless is when it's been manually /revoke on BotFather on the target bot.
If you still having issues. You could try my TelegramBot class that uses the getUpdates method that should be easy to use. I have no issues running my bot on Android and Windows 10 Node.js servers. https://github.com/NightfallAlicorn/telegrambot-nodejs-getupdates Be aware it's not 100% complete but it's stable and has all functionalities except inline bot stuff.
It can happen if someone get updates already. Maybe your bot is running somewhere. I also had this problem when the bot was not running for me, but something still received these updates. I think it will help you to get a new access token via /revoke in #BotFather, after that everything work good in my case.

iPhone up to date Twitter oAuth tutorial

Could someone please give me a single up to date tutorial for implementing OAuth with twitter. I have gone through so many tutorials I have lost count, and not a single one of them is up to date with the new xCode. I tried the MGTTwitter, but there is no tutorial for it. On his own website, where it gives link to tutorial, it just links you to this
http://ww35.2bros1blog.com/2010/07/switching-from-basic-to-xauth-with-mgtwitterengine-on-iphone/
So no idea that that is about
I tried
http://www.icodeblog.com/2010/09/16/dealing-with-the-twitter-oauth-apocalypse/
But I dont know how to add the static folders to xCode. I tried adding the targets, but nothing to add.
Tried following
http://mobile.tutsplus.com/tutorials/iphone/twitter-api-iphone/
However, it is out of date. When I run the app, using my consumer key and secret, when I click authorise, it just closes window, then brings up authorisation window again. I enter user and pass again, does the same thing over and over again.
I downloaded latest version of sharekit, didnt really want to go down this root as all I want is the twitter authorisation and I think adding over 50 files or so is a bit much for one feature, but thought I would give it a shot. But when I open it up, comes up with error around facebook
(null): error: /Users/adam/Downloads/ShareKit-ShareKit-7a05403/Classes/ShareKit/Sharers/Services/Facebook/../../../../../Submodules/facebook-ios-sdk/src/FBDialog.bundle: No such file or directory
All I want is a simple authentication so users can accept and then send tweets from the app. I dont want to use the twitter framework as then users have click send twice, i.e type message into textview, then then twitter viewcontroller appears, then they click send again. I want them to be able to tweet from within the app. Yet I just cannot seem to find any tutorial that explains how to do this in detail.
Could someone please point me in the direction of a tutorial that does this, I didnt think it would be this much hassle to implement a simple authorisation into iPhone, but this is driving me insane!!!
Edit:
I got
http://www.icodeblog.com/2010/09/16/dealing-with-the-twitter-oauth-apocalypse/
This one working, however when I sign in, app crashes and the log says
Authenticated with user (null)
Anyone have any idea about that one?
Found out why I was having a problem with these twitter tools. They were using http rather than https to authenticate with Twitter which is no longer allowed. Just changed it to https and works fine