How open a tweet dialog on button click and detect if user tweeted successfully?


I am creating an app where user clicks on a button or image to open a tweet dialog and writes his custom tweet .
if the tweet is success then there should be a response for success else response failure.
pls help