gpt4 book ai didi

ios - 如何在 iPhone 应用程序中使用 Facebook 对话框检索用户名以制作完整的墙贴?

转载 作者:行者123 更新时间:2023-11-29 05:07:29 25 4
gpt4 key购买 nike

我使用此代码弹出 Facebook 对话框并允许用户发表墙贴,但用户名没有出现。我希望该帖子看起来像“用户名正在使用...”

Facebook *facebook = [[Facebook alloc] init];
SBJSON *jsonWriter = [SBJSON new];
NSDictionary* attachment = [NSDictionary dictionaryWithObjectsAndKeys:
@"is using.... etc etc", @"name",
@"A caption", @"caption",
@"A description", @"description",
nil];

NSString *attachmentStr = [jsonWriter stringWithObject:attachment];
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
API_KEY, @"api_key",
@"Something to say", @"user_message_prompt",
attachmentStr, @"attachment",
nil];

[facebook dialog:@"stream.publish" andParams:params andDelegate:self];

此代码有效,但在“正在使用...”之前没有打印任何内容。用户名不出现。我没有成功找到示例、清晰的文档来理解这一点。有什么想法吗?

最佳答案

通过获取“me”的json对象即可获取当前用户数据; graph.facebook.com/me

关于ios - 如何在 iPhone 应用程序中使用 Facebook 对话框检索用户名以制作完整的墙贴?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4196761/

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