0

場所、誕生日、性別など、ユーザーから他の情報を取得するにはどうすればよいですか? このコードを、私が行っているプロジェクトのガイドとして使用しています。http://windowsphoneaalto.org/2012/01/facebook-get-information-about-the-user/

ユーザーの ID と名前は取得できましたが、その他の情報は取得できません。string location = result["location"].ToString(); を追加して、ユーザーの場所を取得しようとしました。

最終的に null 値と keynotfoundexception が発生しました。これは私が問題を抱えているコードです。

void _fbClient_GetCompleted(object sender, FacebookApiEventArgs e)
    {
        //Turn the data into Dictionary.
        //If you want to see what the Facebook is returning you can check it
        //with this tool provided by Facebook
        //http://developers.facebook.com/tools/explorer/?method=GET&path=me
        var result = (IDictionary<string, object>)e.GetResultData();
        //Get the ID value
        string id = result["id"].ToString();
        //Get the name value
        string name = result["name"].ToString();
        //Currently the thread running this code
        //is not the UI thread and only UI thread can update
        //UI. So we are calling the UI thread here.
        _page.Dispatcher.BeginInvoke(() => {
            MessageBox.Show(name + " (" + id + ")");
        });
4

1 に答える 1

0

私が覚えている限りでは、それを Facebook アプリの拡張アクセス許可に追加してから、それらの詳細を共有する権利をユーザーに付与するように依頼する必要があります。

Facebookの拡張許可をもっと探すと、問題が解決します

于 2013-02-15T01:26:28.147 に答える