0

我对使用 facebook SDK 很陌生。

我在 facebook 上有一个 racin 应用程序,我想挑战其他朋友。还有没有安装app的朋友。

我在 facebook 开发者页面上阅读

媒人

请记住,请求可以发送给已安装游戏的任何玩家;

但为了吸引更多用户,我还想向好友列表中的任何用户发送挑战请求。

我是否必须向那些尚未安装应用程序的人发送应用程序请求?

有没有人有一些在 facebook 上做媒人游戏的经验?也许网上有一个不错的教程?对我来说,FB Doc 非常肤浅。

提前致谢

4

1 回答 1

0

在您的应用程序中导入 FacebookSDK 并使用以下代码。

[FBWebDialogs presentRequestsDialogModallyWithSession:nil
       message:[NSString stringWithFormat:@"I just smashed %d friends! Can you beat it?", nScore]
       title:@"Smashing!" parameters:params handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error)
       {
             if (error) 
             {
                    // Case A: Error launching the dialog or sending request.
                    NSLog(@"Error sending request.");
             } else 
             {
                    if (result == FBWebDialogResultDialogNotCompleted) {
                        // Case B: User clicked the "x" icon
                        NSLog(@"User canceled request.");
                    } else {
                        NSLog(@"Request Sent.");
                    }
             }}
             friendCache:nil];
        }
于 2014-02-26T08:49:27.053 回答