资源,创建Web API像Twitter API或Facebook API? [英] Resource for creating Web API like Twitter API or Facebook API?

查看:272
本文介绍了资源,创建Web API像Twitter API或Facebook API?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是有创建Web API像Twitter API或Facebook API的任何资源。
我想创建自己的网站一个Web API。

is there any resource for creating Web API like Twitter API or Facebook API. I want to create a Web API for my website.

感谢...

推荐答案

你可以做的是公开一个RESTful服务。

What you could do is expose a restful service.

要简单地说你必须返回XML或JSON的网址。请参阅堆叠交换API文档和的样本

To put it simply you'll have urls that return XML or JSON. See the stack exchange API docs and a sample.

您可以创建包装器在尽可能多的语言此服务,只要你喜欢。请参阅 Twitter的API概述,其REST服务和语言很好地包裹这件事。 (如 Linq2Twitter 为例)

You can then create wrappers around this service in as many languages as you like. See the twitter API overview, its a REST service, and languages wrap this up nicely. (Like Linq2Twitter for example)

现在你没有提到你正在使用写你的Web应用程序的语言,但如果你是 .NET ,然后考虑的<​​a href =htt​​p://msdn.microsoft .COM / EN-US /数据/ bb931106> WCF数据服务和的OData 它可以公开从,数据实体数据库(其中包括)通过RESTful服务。请参见 http://www.odataprimer.com/ 的例子。

Now you haven't mentioned the language you are using to write your web app, but if you're with .NET then look into WCF Data Services and OData which can expose, data entities from a database (among other things) over a RESTful service. See http://www.odataprimer.com/ for examples.

另请参阅维基百科&放休息; 我如何解释其余的我的妻子

有关授权直视的OAuth http://www.dotnetopenauth.net/ 如果你使用.NET

For authorization look into OAuth and http://www.dotnetopenauth.net/ if you're with .NET

请注意:Facebook的最初有REST的API,但我觉得在自己的平台的复杂性,让他们改变自己的API

Note: Facebook initially had REST-API but I think the complexity of their platform got them to change their API.

这篇关于资源,创建Web API像Twitter API或Facebook API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆