C# 的 Facebook 类示例?
就像你们中的一些人已经知道的那样,我正在尝试从 facebook 获取 JSON 格式的数据,并在 gridview 或类似的东西中查看它。
在 StackOverflow 的帮助下,我成功获得了所需的数据。
现在我想创建一个 json 字符串的列表。 我是否必须为 json 字符串中的每个 JSON 对象创建一个类?比如班级用户、位置、work_info、education_info?
有没有地方可以找到所有 facebook 对象的 C# 类文件?
我想有很多程序员都在使用这些类,每个人都再次编写相同的类吗?
我添加了对 facebook(.web) sdk 的引用。但我不知道是否可以用它来解决我的问题。
我希望你能帮助我,
谢谢!
Like some of you allready know, i'm trying to get data from facebook in JSON format and view it in a gridview or something like that.
With some help of StackOverflow, i managed to get the data i needed.
Now I want to make a List of my json string.
Do I have to make a class for every JSON object in my json string? Like the class user, location, work_info, education_info?
Is there any place where i can find the c# class files for all the facebook objects?
I think there are a lot of programers who use these classes, does everyone write the same classes again?
I have added a reference to the facebook(.web) sdk. But I don't know if I can use this for my problem.
I hope you can help me,
Thx!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Facebook C# SDK 中没有针对 Facebook Schema 的强类型类的原因是它们通常更改得非常频繁。这就是 Facebook C# SDK 的开发人员决定不这样做的原因:
虽然如果阅读路线图:http://facebooksdk.codeplex.com/wikipage?title=Road%20Map 您将看到有强类型图 API 对象的计划,但看起来没有太多活动在那个地区。
如果您的应用程序需要强类型类,您可能只会使用一些易于创建的类。
The reason why there are not strongly typed classes for Facebook Schema in the Facebook C# SDK is that they usually change very frecuently. That's why the developers of the Facebook C# SDK decided not to go that way:
Although if read the Roadmap: http://facebooksdk.codeplex.com/wikipage?title=Road%20Map you will see that there are plans for a strongly typed Graph API objects but it looks like there is no much activity in that area.
If you need strongly typed classes for your app, you will probably only use a few that are easy to create.