我们构建了一个IOS游戏,现在它正处于测试过程中。当我们尝试通过Facebook在游戏中测试邀请朋友时,我们发现我们的请求只出现在两个地方:1。主页提醒部分位于桌面网络版Faceook的主要新闻源主页的右上角.COM。 2. Faceook.com桌面网络版上的通知宝石。
邀请请求永远不会出现在设备(iPhone或iPad)上的通知宝石中。有人知道我们应该怎么做吗?请帮助我们。谢谢。
以下是代码:
NSMutableDictionary * params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
// Optional parameter for sending request directly to user
// with UID. If not specified, the MFS will be invoked
[NSString stringWithCString:s.c_str() encoding:NSASCIIStringEncoding], @"to",
// Give the action object request information
//@"send", @"action_type",
@"111111111111", @"app_id",
//@"2222222222222", _@"objectid",
nil];
[FBWebDialogs presentRequestsDialogModallyWithSession:nil message:[NSString stringWithCString:words.c_str() encoding:NSUTF8StringEncoding] title:nil parameters:params handler:
^(FBWebDialogResult result, NSURL *resultURL, NSError *error)
{
if(error)
{
// Error launching the dialog or sending the request.
NSLog(@"Error sending request.");
}
else
{
if(result == FBWebDialogResultDialogNotCompleted)
{
// User clicked the "x" icon
NSLog(@"User canceled request.");
}
else
{
// Handle the send request callback
if([[resultURL query] rangeOfString:@"request"].length == 0)
{
// User clicked the Cancel button
NSLog(@"User canceled request.");
}
else
{
// User clicked the Send button
//NSString *requestID = [urlParams valueForKey:@"request"];
//NSLog(@"Request ID: %@", requestID);
NSLog(@"User send request.");
}
}
}
}
];