简体   繁体   English

无法使标签在Facebook iOS SDK 3.0中工作

[英]Can't get tags to work in Facebook iOS SDK 3.0

I've simplified my code to post here, but basically I am doing this: 我简化了我的代码以发布在这里,但是基本上我是这样做的:

id<SCOGMyAction> action = (id<SCOGMyAction>)[FBGraphObject graphObject];
action.user_message = @"My Message";
action.place = selectedPlace; <-- FBGraphPlace
action.tags = selectedFriends; <-- NSArray of FBGraphUser
[FBRequest startForPostWithGraphPath:@"me/ns:action" graphObject:action completionHandler:
    ^(FBRequestConnection *connection, id result, NSError *error) { }];

I can post the user_message and place it fine, but I get a 500 server error when I try to post the tags. 我可以张贴user_message并将其放置好,但是当我尝试张贴标签时,出现500服务器错误。 I am using FBFriendPickerViewController to pick friends and I make sure the friend(s) exist when I assign it to "tags". 我正在使用FBFriendPickerViewController来挑选朋友,当我将其分配给“标签”时,我确保朋友存在。

I took the code from the Scrumptious example. 我从可疑示例中获取了代码。 Has anyone else had success with this? 还有其他人成功吗?

I figured it out in case anyone else has the same problem. 我想通了,以防其他人有同样的问题。

When using the Graph API Explorer, I get the following error: "These users can't be tagged by your app: xxxxxx. Either they aren't developers of your app or your action haven't been approved for tagging." 使用Graph API Explorer时,出现以下错误:“您的应用无法为这些用户添加标签:xxxxxx。他们不是您的应用开发人员,或者您的操作尚未获得批准进行标记。”

So I guess I need to figure out how to set up a test developer account that can receive tags? 因此,我想我需要弄清楚如何设置可以接收标签的测试开发人员帐户? If anyone knows how, please let me know :) 如果有人知道如何,请告诉我:)

Go to your Facebook app settings : https://developers.facebook.com/apps 转到您的Facebook应用程序设置: https : //developers.facebook.com/apps

Then to Edit Settings > Roles 然后编辑设置>角色

You can then add the friends you want to use to test tags. 然后,您可以添加要用于测试标签的朋友。 Add them under the Administrators, Developers, or Tester roles. 将其添加到管理员,开发人员或测试人员角色下。 Those friends/users will get a notification and will have to accept your request to add them before you can tag them. 这些朋友/用户将收到通知,并且必须先接受添加请求,然后才能对其进行标记。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM