gave92 / fbchat-sharp

Facebook Messenger client library for C#

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get user name by thread id

k4r3l01 opened this issue · comments

hello please its will be possible to get user name by thread id?
Thanks in advance for you answer

await this.fetchUserInfo(new List<string>() { THREAD_ID }))

its working but its accesible only by foreach not by index

                var users = await this.fetchUserInfo(new List<string>() { thread_id,author_id });
                int index = 0;
                foreach (var value in users)
                {
                    if (index == 0)
                        sw.WriteLine("thread_id {0}", value.Value.name);
                    else
                        sw.WriteLine("author_id {0}", value.Value.name );
                    index++;
                }

this is working but when i dont know how to access users by index like users[0].name; but users is not accessible by index

so its working like that

var users = await this.fetchUserInfo(new List<string>() { thread_id,author_id });
            string autor = users[author_id].name;
            string thread = users[thread_id].name;