Facebook sdk 3.5请求不工作 [英] Facebook sdk 3.5 requests not working
问题描述
在Facebook SDK 3.5中,我试图使用以下代码发送一个应用程序请求
In Facebook SDK 3.5, I'm trying to send an App Request using the following code
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:nil];
[FBWebDialogs presentRequestsDialogModallyWithSession:nil
message:@"Join"
title:nil
parameters:params
handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error)
{
if (error)
{
NSLog(@"request error");
}
else
{
if (result == FBWebDialogResultDialogNotCompleted)
{
NSLog(@"request FBWebDialogResultDialogNotCompleted");
}
else if([[resultURL description] hasPrefix:@"fbconnect://success?request="])
{
// Facebook returns FBWebDialogResultDialogCompleted even user
// presses "Cancel" button, so we differentiate it on the basis of
// url value, since it returns "Request" when we ACTUALLY
// completes Dialog
NSLog(@"request success");
}
else
{
// User Cancelled the dialog
NSLog(@"request cancelled");
}
}
}
];
如果我使用上述代码与Facebook示例FacebookAppID,URL类型,FacebookDisplayName它的工作正常。
if i use the above code with the Facebook sample FacebookAppID,URL types,FacebookDisplayName it's working fine.
但是,如果我给我自己的acebookAppID,URL类型,FacebookDisplayName通知没有交付。
任何帮助赞赏....
But if i give my own acebookAppID,URL types,FacebookDisplayName the notifications were not delivered. Any help appreciated....
推荐答案
我已经配置了App on Facebook和Native iOS App设置中的配置,现在通知正在交付给iOS和Web应用程序(Facebook)。
I have configured "App on Facebook" and "Native iOS App" configurations in settings, Now the notifications are being delivered to iOS and Web App(facebook).
如果通知未传送到iOS Goto App - >编辑设置 - >应用详细信息,并根据您的需要将类别更改为游戏/商业。现在通知将被传递到您的桌面Facebook以及iOS。
If the notifications are not being delivered to iOS Goto App--> Edit Settings--> App Details and change the category to games/business according to your need. Now the notifications will be delivered to your Desktop Facebook as well as iOS.
我尝试过本机Android应用配置,并将通知传送到桌面,iOS和android,但现在没有运气。我认为android设置有一个问题,请让我知道如果有人有答案。
I have tried "Native Android App" configurations as well to deliver my notifications to desktop,iOS and android,but no luck as of now. I think there is a problem with android settings.please let me know if anyone have the answer.
这篇关于Facebook sdk 3.5请求不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!