OAuth的微博,只有消费者键(不要使用方密钥)的iPhone和Android [英] OAuth Twitter with only Consumer Key (not use Consumer Secret) on iPhone and android

查看:156
本文介绍了OAuth的微博,只有消费者键(不要使用方密钥)的iPhone和Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编程的微博/ Facebook应用程序的iPhone。 我有我自己的Apache / PHP服务器。 我想只有将消费重点在应用程序,那么我将消费者的秘密在我自己的服务器,所以消费者的秘密是秘密。 调查几个演示应用程序(对谷歌)之后。我看到,它很容易与Facebook(只提供的AppId,不能提供AppSecret)。但随着Twitter的誓言库,我必须提供消费重点和消费者的秘密。 反正是有解决它?任何图书馆解决呢?

I'm programing an Twitter/Facebook app for iPhone. I have my own Apache/PHP server. I want to only place the Consumer Key in the app, then I place the Consumer Secret in my own server, so the Consumer Secret is in secret. After surveying several demo apps (on the Google). I see that it's easy with Facebook (only provide AppId, not provide AppSecret). But with Twitter's OAth libs, I must provide both Consumer Key and Consumer Secret. Is there anyway to solve it? Any library solved it?

推荐答案

我找到了解决方案,为我自己:考虑应用程序作为Web应用程序,而不是一个移动应用程序,由3部分组成:Facebook的/ Twitter的服务器,我自己的应用程序(阿帕奇/ PHP)服务器和浏览器(移动设备的Web视图)。在此架构下:我自己的应用程序服务器负责验证和其他任务(张贴到墙上),其存储的appid,应用程序秘密和userToken,所有的信息,它直接连接到Facebook的/ Twitter的服务器;移动设备只作为浏览器的代理角色,只显示Web视图指着我自己的服务器电源,它不会存储任何信息的链接

I found the solution for myself: Consider the app as an web app, not an mobile app, consists of 3 parts: Facebook/Twitter server, my own app (Apache/PHP) server and browser (the web view on mobile device). With this architecture: my own app server is responsible for authentication and other tasks (post to wall), it store appId, app Secret and userToken, all information, it connect to Facebook/Twitter server directly; the mobile device has role only as an browser agent, it only display a web view pointing to the link that my own server supply, it doesn't store any information

考虑Facebook和Twitter这两个文件的有关Web应用程序的身份验证的更多详细信息:

Consider these two documents of Facebook and Twitter about authentication for web app for more detail:

http://developers.facebook.com/docs/guides/web/#登录查看验证部分

https://dev.twitter.com/docs/auth/oauth

这篇关于OAuth的微博,只有消费者键(不要使用方密钥)的iPhone和Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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