使用 .Net 2.0 检索 Facebook Wall 帖子并存储在数据库中

发布于 2024-12-21 14:37:27 字数 732 浏览 1 评论 0原文

我搜索过这个问题,但没有得到/或理解我正在寻找的答案。 我必须使用.Net 2.0,因为我们的系统无法升级。我正在考虑在 github 上使用 Facebook Api,但由于坚持使用 .Net 2.0 的问题,这不会起作用。

现在我的计划是编写一个服务或批处理文件,以获取我公司在 facebook 上的页面的墙贴并将结果存储在SQL数据库中。我已经在 Facebook 上注册了我的应用程序并获得了密码等。

问题。 (我是社交网站和检索结果的新手,但我确实研究了图形 API)

1)是否有 .Net 2.0 检索墙帖的示例?

2)消息以JSON格式返回,不确定是否有为.Net 2.0构建的JSON解析器来处理格式。或者我是否已解析字符串使用我的数据集来存储我想要的结果。

3)我正在使用Open Graph API资源管理器,它只给我一些结果集(帖子),最后xml有一个“分页”,你可以用它导航到更多/旧的帖子。但是如果我想得到怎么办某些日期时间之间的某些墙贴,可以这样做吗?

4)我不想在调用 Facebook 的 webrequest 时出现登录 Facebook 帐户的异常。因为这是一个每天都会运行的服务,我可以在不登录的情况下运行这个服务吗?(我知道 Stack Overflow 上存在类似的无需登录的帖子,但无法理解 .Net 2.0)。

感谢您阅读本文。 任何指示将不胜感激。

感谢

RC,

我也必须为 Linked In 和 Twitter 做类似的事情。

I have searched this question but didn't get / or understood the answer I was seeking.
I have to use .Net 2.0 as our System cant get upgraded. I was thinking of using Facebook Api on the github but that wont work because of the issue of sticking to .Net 2.0

Now my plan is to write a Service or a Batch file that will get the wall posts of the page for my company on facebook and store the results in the SQL database. I have registered my App on the Facebook and got the secret code, etc..

Questions. (I am new to social web sites and retrieving results, but i did study the graph API)

1) Are there any examples for .Net 2.0 to retrieve the wall posts?

2) The messages are returned in the JSON format, Not sure if there is a JSON parser built for .Net 2.0 for handling format. or do i have parse the string use my dataset to store the results i want to.

3) I was using the Open Graph API explorer and it only gives me some resultsets(posts) and in the end the xml has a "paging" which you could use to navigate to more/ older posts.But what if I want to get certain wall posts between some date time, could this be done?

4)I don't want to get an exception to log in to the Facebook account while calling webrequest for Facebook. as this is a service which would run everyday , can i run this service without logging in. ( I know a similar post for without login exist on Stack overflow, but was not able understand in terms of .Net 2.0).

Thanks for reading this.
Any pointers would be appreciated.

Thanks

RC

I also have to do similar things for Linked In and Twitter.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

疑心病 2024-12-28 14:37:28

1)我不知道。但我相信创建额外的服务器是值得花在开发上的钱的。

2) Json 不是 .Net 2.0 内置的。但您可以使用:JsonFx.NET by Stephen M. McKamey(与 Facebook 合作)

3) 您可以使用 FQL。例如:

SELECT 
post_id, viewer_id, message, app_id, source_id, created_time, updated_time, 
filter_key, attribution, actor_id, target_id, message, app_data, 
action_links, attachment, impressions, comments, likes, privacy, permalink, 
xid, tagged_ids, message_tags, description_tags 
FROM stream 
WHERE 
source_id = me() AND 
created_time > 1323961226 AND 
created_time < 1323961250

4) 如果您通过登录请求离线访问(取决于在第 1 点选择的解决方案)并将您的 accessToken 保存在安全的地方,您应该能够归档您所描述的内容。

1) I don't know. But I believe creating extra server is worth the money spent on development.

2) Json is not built-in for .Net 2.0. But you may use: JsonFx.NET by Stephen M. McKamey (Worked with Facebook for me)

3) You may use FQL. For example:

SELECT 
post_id, viewer_id, message, app_id, source_id, created_time, updated_time, 
filter_key, attribution, actor_id, target_id, message, app_data, 
action_links, attachment, impressions, comments, likes, privacy, permalink, 
xid, tagged_ids, message_tags, description_tags 
FROM stream 
WHERE 
source_id = me() AND 
created_time > 1323961226 AND 
created_time < 1323961250

4) If you request offline_access by login (depending on the solution chosen at point 1) and keep in a safe place your accessToken you should be able to archieve what you described.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文