user3598408
user3598408

Reputation: 31

Joining an app's group (v2.0 SDK)

I was trying to use the app groups functionality, and wasn't able to get it working properly.

As per this document: https://developers.facebook.com/docs/apps/changelog#v2_0_games

It states that the behavior is changed as follows: 1) Join Group Dialog - Apps can now show a client-side dialog as an alternative to adding users to a group on the server-side. 2) Add user to group by API removed - Apps can no longer add any user to a group via API. They can only add users that have a role on the app(admins, developers, testers, test users).

And here: https://developers.facebook.com/docs/games/app-game-groups/v2.0

The logic is described as follows: After viewing a group, a player may want to join. Games should provide browse or search functionality to help players find groups. Games need to create a request and approve flow for users to be added to groups. You should use in-game messaging to communicate invites and may consider using App Notifications or Requests. When you want to add the player to the group -- after the admin and player has approved --, you can show a join dialog. When they've been added, a notification will be sent to the user that the player has been added.

So what I understood, that the app access token can't be used to invite or add members anymore through the server, except in case of Devs, Testers, etc. users who can be added directly through Graph API. And now the users need to join on client side (after admin approval if any).

But when I tried creating a sample iOS app which is bounded to my Facebook test app, the following code didn't work (I did create the group using the app access token through Graph API):

NSDictionary *mparams = [NSDictionary dictionaryWithObjectsAndKeys:
                        @"<group-id>", @"id", nil];
[FBWebDialogs presentDialogModallyWithSession:FBSession.activeSession
                                    dialog:@"game_group_join"
                                      parameters:mparams
                                      handler:^(FBWebDialogResult result,
                                                NSURL *resultURL,
                                                NSError *error) {
                                          if (error)
                                          {

I just got blank page when the popup appears, probably it's not able to view\read this group ?. I'm using a session of logged-in user who already authorized the app, and I do validated this through LoginView control.

So, Am I doing something wrong ?. What is the correct scenario that enables users to join app groups ?.

Thanks.

Upvotes: 2

Views: 508

Answers (1)

user3598408
user3598408

Reputation: 31

I opened a bug to facebook. and three days ago, they confirmed the repro, marked it as valid, and assigned to the appropriate team.

Upvotes: 1

Related Questions