'CUSTOM_APP_EVENTS'活动需要参数'custom_events'或'custom_events_file' [英] The parameter 'custom_events' or 'custom_events_file' is required for the 'CUSTOM_APP_EVENTS' activity
问题描述
从Facebook iOS SDK版本3.7.1升级到3.8后,当我通过Facebook对我的应用进行身份验证时,我开始在控制台日志中看到以下内容:
Upon upgrading from the Facebook iOS SDK version 3.7.1 to 3.8, I started seeing the following in my console log when authenticating with my app through Facebook:
FBSDKLog: Error Domain=com.facebook.sdk Code=5 "The operation couldn’t be completed. (com.facebook.sdk error 5.)" UserInfo=0xc5a9cf0 {com.facebook.sdk:HTTPStatusCode=400, com.facebook.sdk:ParsedJSONResponseKey={
body = {
error = {
code = 100;
message = "(#100) The parameter 'custom_events' or 'custom_events_file' is required for the 'CUSTOM_APP_EVENTS' activity";
type = OAuthException;
};
};
code = 400;
headers = (
{
name = "Access-Control-Allow-Origin";
value = "*";
},
{
name = "Cache-Control";
value = "no-store";
},
{
name = Connection;
value = close;
},
{
name = "Content-Type";
value = "text/javascript; charset=UTF-8";
},
{
name = Expires;
value = "Sat, 01 Jan 2000 00:00:00 GMT";
},
{
name = Pragma;
value = "no-cache";
},
{
name = "WWW-Authenticate";
value = "OAuth \"Facebook Platform\" \"invalid_request\" \"(#100) The parameter 'custom_events' or 'custom_events_file' is required for the 'CUSTOM_APP_EVENTS' activity\"";
},
{
name = "x-fb-loadmon";
value = "0,2.76,90";
}
);
}, com.facebook.sdk:ErrorSessionKey=<FBSession: 0x12e5e9c0, state: FBSessionStateOpen, loginHandler: 0x12e58630, appID:..., urlSchemeSuffix: , tokenCachingStrategy:<FBSessionTokenCachingStrategy: 0xd884b00>, expirationDate:..., refreshDate:..., attemptedRefreshDate:..., permissions:...>}
我已经下载了最新版本的Facebook iOS应用程序,并验证了我在AppDelegate中对Facebook SDK的调用是最新的。要进行身份验证,我发送 openActiveSessionWithReadPermissions:allowLoginUI:completionHandler:
消息到 FBSession
。
I've downloaded the most recent versions of the sample Facebook iOS apps and verified that my calls to the Facebook SDK in my AppDelegate are up-to-date. To authenticate, I am sending the openActiveSessionWithReadPermissions:allowLoginUI:completionHandler:
message to FBSession
.
看起来好像这可能是Facebook的一个bug(我要向他们提交一个bug),但也有可能我做错了什么 - 任何帮助/见解都会受到赞赏!
It seems like this very well could be a Facebook bug (I am going to file a bug with them), but it's also possible that I'm doing something wrong – any help/insights would be appreciated!
我通过添加对 [FBAppEvents setFlushBehavior:FBAppEventsFlushBehaviorExplicitOnly];
的调用暂时解决了这个问题AppDelegate,但我更喜欢更全面的解决方案。
I've temporarily resolved the issue by adding a call to [FBAppEvents setFlushBehavior:FBAppEventsFlushBehaviorExplicitOnly];
in my AppDelegate, but I would prefer a more comprehensive solution.
3/24/2014编辑
这不再是3.8的重复版(它也没有在3.13上重复,我也测试了它)。似乎Facebook必须在服务器上修复此问题。
This no longer repros on 3.8 (nor does it repro on 3.13, which I also tested). Seems like Facebook must have fixed this on the server.
推荐答案
- 访问developers.facebook.com
- 从标题栏中点击应用
- 选择您当前正在使用的应用并点击编辑应用
- 在左侧导航栏中,您会看到设置标签
- 在设置下,点击高级标签,然后向下滚动到见解部分
- 将安装见解和移动SDK见解更改为已停用
- Go to developers.facebook.com
- From the header bar, click on "Apps"
- Select the app you're currently working on and click "Edit App"
- On the left hand navigation bar, you'll see a "Settings" tab
- Under "Settings" click on the "Advanced" tab and scroll down to the "Insights" section
- Change "Install Insights" and "Mobile SDK Insights" to "Disabled"
这篇关于'CUSTOM_APP_EVENTS'活动需要参数'custom_events'或'custom_events_file'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!