1

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?

2 Answers 2

2

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

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

http://developers.facebook.com/docs/guides/web/#login view Authentication section

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

1
  • Was googling for this. it's 2017 and Twitter still has not solved this.
    – Jonny
    Sep 8, 2017 at 2:54
0

No that the way it works with OAuth en Twitter.

2
  • There's a method called XAuth. I get a peek in the code. I guess that: in Authorization part, it not need Consumer Secret. Please confirm!
    – vietstone
    Oct 11, 2011 at 11:51
  • For twitter you will always need the secret.
    – rckoenes
    Oct 11, 2011 at 12:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.