Not able to fetch additional info of other players

0 votes

Hi,

 

Can you please help me with this as i am not able to fetch the additional info of other players.

The only info i am receiving is for current player.

I am getting other players scores but not their additional info which is saved in the collection.

 

Already Asked at link

http://forum.shephertz.com/?qa=4059/get-additional-data-for-users

 

 

NSString *key = @"name";

    NSString *value = @"FBUserId";

    int max = 5;

    

    NSString *dbName = @"DBName";

    NSString *collectionName = @"CollectionName";

    

    Query *query = [QueryBuilder buildQueryWithKey:key value:value andOperator:APP42_OP_EQUALS];

    

    [App42API setDbName:dbName];

    [_scoreBoardService setQuery:collectionName metaInfoQuery:query];

    

    Game *game = [_scoreBoardService getTopNRankers:kLeaderBoardServiceGameNameKey max:max];

    NSMutableArray *playersIdArray = [[NSMutableArray alloc] init];

    

    NSLog(@"Game Name=%@",game.name);

    NSLog(@"Description =%@",game.description);

    for (Score *score in game.scoreList)

    {

        NSLog(@"UserName=%@",score.userName);

        NSLog(@"ScoreId=%@",score.scoreId);

        NSLog(@"CreatedOn=%@",score.createdOn);

        NSLog(@"Rank=%@",score.rank);

        NSLog(@"Score=%f",score.value);

       NSLog(@"Json Array Count  : %d",score.jsonDocArray.count);

}

asked Oct 17, 2014 in AppWarp by dhingra.viral2511 (10 points)

1 Answer

0 votes
Viral,

Pass the query as null instead of quering on the based of name and FBId to find the other player info. Because in the query which you have requested that find the addtional info for all user where name is mine FBId. That is why it is only returning the currennt user profile. Either change your query on the basis of other key-value of set query as nill.
answered Oct 17, 2014 by jsjacky007 (10 points)
I Tried that as well but its not working...i checked it on the console also..and i can find two json records over there...but i could fetch only one with setting the query to nil...please help....
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...