Get Users Status

Jul 11, 2010 at 8:43 PM

Hello everyones,

I've been looking for my answer for 2 days now and i can't find the answer to my question. I can get log into Facebook but when i try to get my status i get a null exception... here is my sample:

void GetUserInfoCompleted(IList<user> users, Object state, FacebookException e)
        {
            if (e == null)
            {
                user u = users.First();
                if (u.pic != null)
                {
                    Uri uri = new Uri(u.pic);
                    Dispatcher.BeginInvoke(() =>
                    {
                        Facebook_Name.Text = u.first_name + " " + u.last_name;
                        ImageSourceConverter img = new ImageSourceConverter();
                        Facebook_Profile_Picture.SetValue(Image.SourceProperty, img.ConvertFromString(u.pic_small));
                        Facebook_Statut.Text = u.status.message;
                    });
                }
            }
            else
            {
                Dispatcher.BeginInvoke(() => MessageBox.Show("Error: " + e));
            }
        }

I really don't see why u.status is null.

Jul 11, 2010 at 10:13 PM

My guess would be that you need the read_stream permission... Although it does get a bit confusing - one would have thought that the owner of the application would be able to test with full permissions against their account, but perhaps it is a good way to learn which permissions are needed to access what...

Jul 12, 2010 at 3:49 AM

Ok thanks, i don't really get how it works but i'll try.

Aug 10, 2010 at 6:14 AM
I granted my app the read_stream permission and it still doesn't work. There's something up with grabbing statuses, I cannot get it to work at all, and I had it working up until recently. One day the status just stopped appearing. Can still update the status, but cannot pull it into a remote site. I have a feeling that some of the security changes may have fubared it.