简体   繁体   中英

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. I am using FBFriendPickerViewController to pick friends and I make sure the friend(s) exist when I assign it to "tags".

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."

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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