Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I have a button that will be disabled until you send out a tweet that I have cra

ID: 647851 • Letter: I

Question

I have a button that will be disabled until you send out a tweet that I have crafted.

Only users with twitter accounts will have access to this, and I will require users to sign-in to be able to access this button.

What kind of tools are available for me to check whether

The user has actually tweeted it
The user has not deleted the tweet afterwards
Now, there is no way to actually stop the user from deleting the tweet, but I would like to disable the button if the user has actually chosen to delete it afterwards.

Explanation / Answer

By the fact "Only users with twitter accounts will have access to this, and I will require users to sign-in to be able to access this button" it simply means that the user ALREADY has login, before you start creating the HTML page.

Ie, before login, the user will see a form of HTML page, but after login, and at your webserver you have authenticated him via OAUTH2, then you will create the HTML specifically past-login.

That will also help to answer "the user has actually tweeted it", as you can now link the userid, with the tweet counter for specifically that user - 0 or 1. Ie, you need will need to maintain a database at the server side of all userid who have tweeted it, and then add/remove everytime a new user added to it, or old user remove from it. (which answer question 2)

Now, finally is the display of button: simple, just check the database, if the userid is there, display it, otherwise don't generate the button for the HTML.

As you can see, everything is done at the server side - just like the user-dependent information for stackexchange.com as well. If u create embedded Javascript to do the generation of HTML? well, it is not secure, and also wrong, because the user can login / delete from from two different PC/browser, and you will get inconsistencies.