dks1725
dks1725

Reputation: 1631

How to check whether user has click on skip button or publish button in FBConnect in iPhone?

I have integrated FBConnect with my iPhone app.

Now i want to display a custom alert view if user has publish some post. But i didn't get how to make sure that user has tapped "Publish" button or "Skip" button in dialog box.

Same way i have functionality of post image on wall and i want to check whether image has posted successfully or not.How i can achieve above 2 things?

Plz gv ur answer ASAP. Thnks in advance to all

Upvotes: 2

Views: 522

Answers (2)

amavi
amavi

Reputation: 534

Thought this would save more time for others

-(void)dialogCompleteWithUrl:(NSURL *)url
{    
    NSString *responseURL = [url absoluteString];
    NSLog(@"[%@]",responseURL);
    if ([responseURL rangeOfString:@"post_id"].length>0) {
        ///Publish response received here...
        UIAlertView *feedPostedAlert = [[UIAlertView alloc]initWithTitle:@"Success" message:@"Feed posted to your wall successfully" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil];
        [feedPostedAlert show];
        [feedPostedAlert release];
    }
}    

Upvotes: 1

Biosopher
Biosopher

Reputation: 616

If the user publishes, then you'll get a call back to dialogCompleteWithUrl with something like this:

fbconnect://success/?post_id=12345

If the user presses Skip, you'll get this (no post_id):

fbconnect://success

Upvotes: 1

Related Questions