本文介绍了iOS版Facebook Connect:dialogDidComplete响应差异化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何区分用户在嵌入式流式后置FBDialog中点击提交"还是跳过".有人知道要测试什么吗?

I was wondering how to differentiate between the user tapping submit or skip in the inline post-to-stream FBDialog. Anyone know what to test for?

我正在iOS 4.2环境中使用最新的iOS Facebook Connect.

I am using the latest iOS Facebook Connect in a iOS 4.2 environment.

/**
 * Called when a UIServer Dialog successfully return.
 */
- (void)dialogDidComplete:(FBDialog *)dialog {
    if user tapped submit and post was successful
        alert user of successful post

    if user tapped "skip" (cancel equivalent)
        do not display alert
}

推荐答案

正如Fede和kennbrodhagen所说,这看起来是最简单的方法(直到Facebook修复此错误):

As Fede and kennbrodhagen said, this looks like the easiest way (until Facebook fixes this bug):



- (void) dialogCompleteWithUrl:(NSURL*) url
{
    if ([url.absoluteString rangeOfString:@"post_id="].location != NSNotFound) {
        //alert user of successful post
    } else {
        //user pressed "cancel"
    }
}

这篇关于iOS版Facebook Connect:dialogDidComplete响应差异化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 15:21