prevent twitter bot from taking over direct messages on page - twitter

Pls, I really need help asap.I have created a dialogflow bot for an institution and it is to integrated into twitter. after following dialogflow's documentation, I managed to place it on the company's official twitter page. but now, I'm having an issue with communicating with the bot. I always have to send a DM or tweet to the page in order to get response from the bot. but, the company uses the same page to receive customer complaints. Please, isn't there anyway that I could host the bot on the page and get users to be able to chat with the bot and/or also with customer care.

You can try deploying it on a dummy page for the time being and fixing the issue.
If I'm misunderstanding something here then I'm sorry but from what I can tell, you made a bot and deployed it on the official twitter page but the behaviour was not as expected. This has lead to the bot replying to customers when it wasn't supposed to? I'm sure you're in a hurry but its not perfectly clear but that's what I got from the post
Also, its always better to test on a dummy page before deploying to the official page.

Related

Tweet replies and notifications are missing

I built an automatic reply bot on Twitter and at first it seems to work fine.
However, after some weeks running, I cannot see the replies from the bot anymore.
Concretely, when I tweet to the bot, I don't see the reply and notification, but If I log in as the bot, I see all the replies (only the bot can see the replies).
For sure, I always include #username at the beginning of replies and use the parameter in_reply_to_status_id. Moreover, my tweet is specific for the bot and nobody has replied to it, so it isn't a problem with a very large number of replies.
Is that a problem with Twitter platform?
Thanks.
It turns out that Twitter has flagged my account due to weird behavior, which is posting plenty of messages against the bot with similar content.
In fact, my Twitter account is blocked after some time. Unblocking it solves the problem.

how to make an quickbooks Api call and bypass login

I know I'm probably going to get a "no, you can't do that" but it doesn't seem reasonable to me.
My client uses Quickbooks Online and wants to be able to have his customers sign in to his web site and see how much they owe, and then pay their invoices with a credit card.
Obviously, the customers themselves can't be signing into Quickbooks Online. We want the web server to be able to directly access the data via the api.
I've found the api but I'm not sure if it's possible to have the webserver connecting to it and getting the data it needs.
I know this can be done with other systems. I've done it with GMail and Salesforce using OAuth2.
The biggest piece I want to load from quickbooks as well might be something unavailable as I couldn't find it in the API anywhere. When my client opens Quickbooks Online, he can send an email to any customer that will include a link to pay online by credit card. We'd like to be able to find that link and redirect the user to it. But I'm not sure if it's available via the api.
I could go with webhooks but that would require storing all that data on our webserver, and syncing it for existing data. Not to mention what happens if an update happens to fail.
You're misunderstanding how OAuth works a bit, which is what is causing the confusion here.
The person who owns the QuickBooks company logs in, not the end-user. They log in ONCE, and that gets you OAuth tokens that you can use to make server-to-server calls forever going forward.
Soooo...
I know I'm probably going to get a "no, you can't do that" but it doesn't seem reasonable to me.
You can do what you're trying to do, you're just going about it the wrong way.
Obviously, the customers themselves can't be signing into Quickbooks Online.
Correct.
We want the web server to be able to directly access the data via the api.
That's fine, and totally do-able.
I've found the api but I'm not sure if it's possible to have the webserver connecting to it and getting the data it needs.
It is do-able.
The key understanding here is that you're going to have an OAuth connection process that the person who owns QuickBooks is going to go through just once, to get you OAuth tokens.
You're then going to store those OAuth tokens server-side (e.g. in your database).
You can then use those stored OAuth tokens to make future server-to-server API calls whenever you want.
When my client opens Quickbooks Online, he can send an email to any customer that will include a link to pay online by credit card. We'd like to be able to find that link and redirect the user to it. But I'm not sure if it's available via the api.
I don't think this information is available via the API right now.
There is an API endpoint to send an email invoice, if that's helpful:
https://developer.intuit.com/docs/api/accounting/invoice

several errors with sandbox.paypal.com?

I am trying to integrate paypal to my web app. I want to use paypal as payment gateway. In the process i am encountering various errors as listed below.
1) I logged into developer.paypal.com. When i click Accounts under Sandbox it lists all sandbox accounts i have. I wanted to delete the unused account but it says "Something went wrong. One or more sandbox accounts could not be deleted. Try again.".
2) I created merchant or business account in developer.paypal.com. I then logged into sandbox.paypal.com using the created business account. In the dashboard page there is Tools at the top. I clicked on it and selected API credentials in order to get the api credentials for paypal integration to my web app. After clicking on it, it redirects me to my official paypal account dashboard page. i.e https://www.paypal.com/myaccount/home
3) Finally another issue i have been facing and of which i have not been able to receive any solution yet is described in detail here. error trying to make sandbox paypal to work with rails?
So seeing all these issues i am wondering whether sandbox account is full of bugs and cannot be trusted for api integration testing. In that case does one recommend testing with real accounts? but that will be expensive because we need to send real money.
I appreciate any help on this dilemma. Thanks!
1) Unfortunately, this is something that tends to happen in their sandbox. You can try again later and it might work...it might not.
2) If this happens you should be able to add "sandbox" back into the URL. So in this case if you change it back to https://www.sandbox.paypal.com/myaccount/home then it should load what you're expecting.
3) Need to see the actual error code that's coming back in the PayPal response to help more on this one.

Is approval-based sign-ups possible with Slack?

Normally, I invite new members via. email, that I get from them individually.
Let's say I want to campaign publicly for volunteers to join our community, then what is the best approaches with various level of control?
It is not possible out-of-the-box, but you can develop a custom website, where people can apply for your Slack and enter the name and email address.
You can then forward their request for you to approve (e.g. a page with a table of all open requests where each can be approved or denied or an automatically generated email to you etc).
Finally you can auto-invite every approved user with his email address. The Slack API has an undocumented API function that allows that. Check here for my post about that method.
I have done a similar website for inviting people from a gaming community (Eve Online), where they have to first authenticate themselves with their game login before getting an invite to our Slack. It works pretty well. I made this website with PHP, but basically every server based script language will work.

Twitter feed on corporate site

I have a corporate website that I want to pull in tweets to, but i'm getting a rate limit using the http feed. So, I want to use an authenticated method to get the tweets.
Do I really have to register an application to do this, even though it's not really an application and my users will never be entering or changing the twitter account info.
Also, my corporate site doesn't have a public address, and registering an application through twitter appears to require a public url. So how can I get around this? Do I have to create a "fake" application with a public url, just to generate my keys?
Thanks for any help on this.
If your site is behind a proxy server along with all your users, using Javascript/jQuery won't help. All the requests will still be coming from the same IP and will hit a rate limit, as you're doing now.
The other issue is that you don't need to register an app to request a feed. Apps are only needed for Oauth, and getting a feed doesn't need that.
The best way to deal with this is to get the feed with a server script, store it on the server, and then deliver the server copy to the web pages. If you request the feed less than 150 times per hour, you won't have a limit problem.
If you want more than a single feed, you can use the streaming API to get all the tweets for up to 400 keywords or from up to 5,000 users. This still doesn't need a registered app, since the streaming API still allows Basic Auth.
Just wanted to post this for future reference and in case anyone else has the same question. The solution to my problem, was to register an application on twitter. But since I'm just using a single user, you don't have to do the regular OAuth steps of generating a request for a key, getting the response etc. Every app you register in twitter get's its own "Access Token" that you can use to retrieve tweets etc. So, this is what I ended up doing to solve the problem I was having.
Additional details: My main concern was having to do the OAuth steps of requesting an access code etc... Since my application is only a single user implementaion (just pulling in our company related tweets from company held twitter accounts), it just seemed unneccesary to have to do all of that. But what I found was that when you register an app on twitter, you get a private access token for each app. You can view a little information about that here: https://dev.twitter.com/pages/oauth_single_token.
It sounds like you are pulling the feed down over http on the server? You could just limit the updates so you don't hit the rate limit.
I would recommend instead doing this on the client side. There are a lot of very easy to use embeddable java script twitter clients out there. The rate limiting problem would dissapear as the feed would be coming from the desktop and not the server (unless they just kept refreshing it).
The Twitter developer wiki lists a few.
JQuery plugin for Twitter
Tweet (another JQuery plugin)

Resources