I am trying to give "bonus points" for users who either tweet my advertisement message or post my advertisement message on Facebook. How can I detect if...
1) The user actually pressed the post button (this way I can give them the bonus points in app)?
2) The user did not change any text in the message box (my advertisement)?
On a side note, is it possible to make the message box for these un-editable? Here is my code to actually present the message to post each:
- (IBAction)tweetButtonPressed:(id)sender
{
if([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter])
{
SLComposeViewController *tweetSheet = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter];
[tweetSheet setInitialText:@"My advertisement message goes here."];
[self presentViewController:tweetSheet animated:YES completion:nil];
}
else
{
UIAlertView *alertView = [[UIAlertView alloc]
initWithTitle:@"Twitter Connection Failed"
message:@"Make sure your device has an internet connection and you are connected to Twitter through your iPhone settings."
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alertView show];
}
}
- (IBAction)facebookPostButtonPressed:(id)sender
{
if([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook])
{
SLComposeViewController *controller = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];
[controller setInitialText:@"My advertisement message goes here."];
[self presentViewController:controller animated:YES completion:nil];
}
else
{
UIAlertView *alertView = [[UIAlertView alloc]
initWithTitle:@"Facebook Connection Failed"
message:@"Make sure your device has an internet connection and you are connected to Facebook through your iPhone settings."
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alertView show];
}
}