使用ASP.Net C#张贴鸣叫到Twitter从Facebook [英] Post Tweets to Twitter from FaceBook using ASP.Net C#

查看:112
本文介绍了使用ASP.Net C#张贴鸣叫到Twitter从Facebook的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建使用Facebook工具包的.Net一个Facebook应用程序,我所要做的是创建一个Facebook上的Web应用程序,它允许用户鸣叫。

I have created a facebook application using FaceBook ToolKit for .Net, What I am trying to do is create a WebApp for FaceBook which allows users to tweet.

我也读到twitterizer库,允许ASP.Net创建应用服务的Twitter,但它与其中一个用户被重定向到Twitter.com OAuth认证。

I have also read about twitterizer library, that allows ASP.Net to create Apps for Twitter but it comes with OAuth authentication where a user is redirected to Twitter.com.

我所试图做的是,一旦用户已批准该应用程序将接受他们的Twitter帐户的用户名和密码,然后使用Twitterizer库将发布他们的tweets。

What I am trying to do is once user has given permission the app will accept username and password for their twitter account and then using Twitterizer library it will post their tweets.

所有我需要的是一些指导

All I need is a little guidance

很多

推荐答案

简短的回答:你必须使用OAuth

Short answer: You have to use OAuth.

Twitter已经不再支持基本的HTTP认证,现在需要的OAuth为所有Twitter的应用即可。您不再需要将您的应用程序中使用他们的Twitter用户名/密码。这是OAuth的点。

Twitter has no longer supports Basic HTTP Auth, and now requires OAuth for all Twitter Applications. You no longer need to have your app use their twitter username/password. That's the point of OAuth.

这是非常类似于如何Facebook应用的授权工作。当有人想利用你的Facebook应用程序,他们必须登录到Facebook和给使用您的信息,您的应用程序的权限。

This is very similar to how Facebook App authorizations work. When someone wants to use your facebook app, they have to login to Facebook, and give your app permission to use your information.

这是与Twitter同样的事情了。您将需要获得Twitter的API密钥为您的应用程序,那么当用户首先要鸣叫,你会与你的API密钥到Twitter,这将有你的用户第一次登录到微博,然后授权你的应用程序的OAuth请求。

It's the same thing with Twitter now. You will need to get a twitter API key for your app, then when users first want to tweet, you will make an OAuth request with your API key to Twitter, which will have your users first login to Twitter, then authorize your application.

在这之后的过程,你的应用程序将能够后用户鸣叫各自的Twitter账户。

After that process, you application will be able to "post" users tweets to their respective twitter accounts.

这篇关于使用ASP.Net C#张贴鸣叫到Twitter从Facebook的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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