gpt4 book ai didi

ios - 打开图故事文章对象

转载 作者:行者123 更新时间:2023-12-01 18:18:31 35 4
gpt4 key购买 nike

我正在尝试从我的iOS游戏发布一个对象。我仔细检查了权限,然后复制并粘贴了Facebook给我的代码,但它不起作用:S

任何的想法?

NSMutableDictionary<FBGraphObject> *object =
[FBGraphObject openGraphObjectForPostWithType:@"game:level"
title:@"Sample Level 2"
image:@"https://fbstatic-a.akamaihd.net/images/devsite/attachment_blank.png"
url:@"http://samples.ogp.me/367110273423562"
description:@""];;

object[@"create_object"] = @"1";
object[@"fbsdk:create_object"] = @"1";

[FBRequestConnection startForPostWithGraphPath:@"me/objects/game:level"
graphObject:object
completionHandler:^(FBRequestConnection *connection,
id result,
NSError *error) {
// handle the result
NSLog(@"Result: %@",error);
}];

错误回调:
Result: Error Domain=com.facebook.sdk Code=5 "The operation couldn’t be completed. (com.facebook.sdk error 5.)" UserInfo=0x1690d1d0 {com.facebook.sdk:HTTPStatusCode=400, com.facebook.sdk:ParsedJSONResponseKey={
body = {
error = {
code = 2500;
message = "Cannot specify type in both the path and query parameter.";
type = OAuthException;
};
};
code = 400;
}, com.facebook.sdk:ErrorSessionKey=<FBSession: 0xae21820, state: FBSessionStateOpen, loginHandler: 0xc1279f0, appID: 358605784274011, urlSchemeSuffix: , tokenCachingStrategy:<FBSessionTokenCachingStrategy: 0xae227a0>, expirationDate: 2013-12-07 05:14:08 +0000, refreshDate: 2013-10-08 14:48:02 +0000, attemptedRefreshDate: 0001-12-30 00:00:00 +0000, permissions:(
"basic_info",
installed,
"user_location",
email,
"user_friends",
"user_birthday",
"publish_actions"
)>}

我尝试搜索解决方案,但在iOS上找不到

谢谢

最佳答案

您收到Cannot specify type in both the path and query parameter错误,因为objectgraphPath参数都包含对象类型,即game:level。不用传递@"me/objects/game:level",只需使用@"me"即可。

关于ios - 打开图故事文章对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19261943/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com