Configuring an app for domain.com and www.domain.com


#1

I have configured three (and then four which didn’t help) apps - two for testing and one (then two) for our live site. The live site can be accessed by domain.com and www.domain.com. When I first configured the live app it was for www.domain.com. While testing some users logged in with domain.com and some with www.domain.com and there was a problem.

The question is what, if anything, how do I need to configure the app to be able to use both domain.com and www.domain.com. I have spent hours going through documentation and discussions and can not find an answer.

I have been “saddled” with an older version of a Twitter library (Facebook, Twitter & Linkedin Status Update, Author: Md. Mahmud Ahsan (http://thinkdiff.net)) and it is very possible it is just a code issue. However, I do need to know if there is anything that has to be configured in a specific way to make this work.

Thank you!


#2

What calls is this in regard to? When you say “there was a problem”, what were the symptoms you saw?


#3

use htaccess to move from www.domain.com to domain.com …helps you out tremendously…
search google for “www to non www redirect htaccess”


#4

First - strange, I am subscribed to this thread but haven’t received any emails and thank you for the responses

The question has nothing to do with the actual site running (I can access the site equally as well from domain.com and www.domain.com), it is specific to Twitter or rather the implementation of Twitter.

The question is this - what, if anything, do I need to do when I setup the Twitter application so that domain.com and www.domain.com use the same app (same consumer key and same consumer secret).

The problem occurs during the login to Twitter in that the final callback occurs to www.domain.com/authcallback.php even though the request started from domain.com. However, due to the age of the library used (I inherited this part of the project) I am not seeking help in how the library may be broken but rather how to configure a Twitter app for domain.com and www.domain.com.


#5

If it’s an OAuth based app, you just need to make sure you’re telling Twitter where to redirect to based on where the user is at. It’s likely you have a placeholder callback URL in your application record but aren’t sending oauth_callback on the oauth/request_token step so it’s defaulting to what’s on your application record. This is invalid OAuth and will not work forever. You’ll need to go into your code and fix the OAuth implementation to alleviate this – but it’d also be wise for you to choose whether to serve content on www.domain.com OR domain.com but not both.


#6

Thank you for the information. It is OAuth and oauth_callback is “oob” but this is from a library that is over a year old and I am not sure it is what I really need but time is not permitting to rewrite this code.

What I will do is to force the browser to www.domain.com.

Again, thank you for your assistance.


#7

Please HELP…I am getting hundreds of these e-mails in my inbox as INVALID ADDRES @SYNTAX ERROR…i just cannot understand what is this…please do something about it.


#8

Please sort out this problem about INVALID ADDRESS@SYNTAX ERROR…