Facebook App邀请未收到 [英] Facebook App Invite not received

查看:286
本文介绍了Facebook App邀请未收到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的iOS应用程序发送一个Facebook邀请,但是从来没有看到过,我不知道为什么。这是我使用的代码:

I'm trying to send a facebook invite for my iOS application, but it never seems to get there and I can't figure out why. Here is the code I'm using:

-(void)inviteFriend:(NSString *)facebookId {

NSDictionary *parameters = @{ @"to": facebookId };
[FBWebDialogs
 presentRequestsDialogModallyWithSession:nil
 message:[NSString stringWithFormat:@"You've received an invite to my game!"]
 title:nil
 parameters:parameters
 handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error)
 {
     if(error)
     {
         NSLog(@"Some errorr: %@", [error description]);
         UIAlertView *alrt = [[UIAlertView alloc] initWithTitle:@"Invitiation Sending Failed" message:@"Unable to send inviation at this Moment, please make sure your are connected with internet" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil];
         [alrt show];
     }
     else
     {
         if (![resultURL query])
         {
             return;
         }

         NSDictionary *params = [self parseURLParams:[resultURL query]];
         NSMutableArray *recipientIDs = [[NSMutableArray alloc] init];
         for (NSString *paramKey in params)
         {
             if ([paramKey hasPrefix:@"to["])
             {
                 [recipientIDs addObject:[params objectForKey:paramKey]];
             }
         }
         if ([params objectForKey:@"request"])
         {
             NSLog(@"Request ID: %@", [params objectForKey:@"request"]);
         }
         if ([recipientIDs count] > 0)
         {
             //[self showMessage:@"Sent request successfully."];
             NSLog(@"Recipient ID(s): %@", recipientIDs);
             //UIAlertView *alrt = [[UIAlertView alloc] initWithTitle:@"Success!" message:@"Invitation(s) sent successfuly!" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil];
             //[alrt show];
         }

     }
 }friendCache:nil];

}

控制台输出显示为它正在发送:

The console output appears like it is sending:

[FacebookManager inviteFriend:] _ block_invoke [第288行]请求ID:766594713370919
[FacebookManager inviteFriend:] _ block_invoke [第293行]收件人ID (
正确的用户ID

[FacebookManager inviteFriend:]_block_invoke [Line 288] Request ID: 766594713370919 [FacebookManager inviteFriend:]_block_invoke [Line 293] Recipient ID(s): ( correct User ID here )

但是当我通过我登录到facebook用户iOS设备,没有通知。

but when I log in to that facebook user via my iOS device, there is no notification.

该问题似乎与其他几个人重复,但也没有答案:
Facebook的Facebook设置邀请朋友
fb邀请不能工作的代码

The question appears to be a duplicate of a couple others, but neither have answers: Facebook setting for Invite friend in Facebook Code for fb invitation not working

谢谢。 p>

Thanks.

推荐答案

在Facebook应用帐户中设置iOS设置?

Have set the iOS setting on Facebook app account ?

请注意通知仅适用于移动设备(NOT ON WEB BROWSER)。

Note that the notification is only available at Mobile device only (NOT ON WEB BROWSER).

Facebook开发人员基本设置

这篇关于Facebook App邀请未收到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆