开发Windows Phone 8应用程序。我得到一个例外。无法将类型为“System.Boolean”的对象强制转换为“System.Collections.Generic.IDictionary” [英] developing a windows phone 8 application. I am getting An exception. Unable to cast object of type 'System.Boolean' to type 'System.Collections.Generic.IDictionary
本文介绍了开发Windows Phone 8应用程序。我得到一个例外。无法将类型为“System.Boolean”的对象强制转换为“System.Collections.Generic.IDictionary”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我集成了facebook SDK,我这样做是为了在墙上发布数据
I integrated facebook SDK, I am doing this to post data on the wall
FacebookClient fb = new FacebookClient(App.AccessToken);
fb.PostCompleted += (o, e) =>
{
if (e.Error != null)
{
Dispatcher.BeginInvoke(() => MessageBox.Show(e.Error.Message));
return;
}
var result = (IDictionary<string, object>)e.GetResultData();
Dispatcher.BeginInvoke(() =>
{
MessageBox.Show("Posted Open Graph Action, id: " + (string)result["id"], "Result", MessageBoxButton.OK);
});
};
但是获得例外,
异常类型'System.InvalidCastException'在fbtest.DLL中发生但未在用户代码中处理
附加信息:无法将类型为'System.Boolean'的对象强制转换为输入'System.Collections.Generic.IDictionary`2 [System.String,System.Object]'。
But getting exception,
An exception of type 'System.InvalidCastException' occurred in fbtest.DLL but was not handled in user code
Additional information: Unable to cast object of type 'System.Boolean' to type 'System.Collections.Generic.IDictionary`2[System.String,System.Object]'.
推荐答案
这篇关于开发Windows Phone 8应用程序。我得到一个例外。无法将类型为“System.Boolean”的对象强制转换为“System.Collections.Generic.IDictionary”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文