views:

332

answers:

5

i am using twitterizer to have a web front end to twitter data. I'm trying to figure out how i can test on a localmachine when you have to put in a valid public callback url in your application registration. The twitter page doesn't let you have a callback url like this:

http://localhost:3444/Callback . .

any suggestions?

+1  A: 

Instead of localhost can you use your IP?

You can get it using whatismyip.com.

HTH

DannyLane
@DannyLane - twitter seems to allow that but for some reason when i put that address [http://[ipaddress]:3434] it doesn't seem to take me to the same place as [http://localhost:3434/]
ooo
@oo could it be something like port forwarding not being setup on your router/firewall to forward requests on port 3434 to that port on your local machine? I believe no-ip like Navi Sidhu suggested will still give you the same problem as you are facing now, you will still need to forward ports. Do you have a site running on your local machine on that port? Can you access the site on that port via the ip? if you can then I think the port forwarding is setup correctly.
DannyLane
@DannyLane -i am just using the webserver that kicks off when you start a web solution in visual studio
ooo
@oo ok, if you go to http://[your ip address]:3434 in your browser does your website show up? If it dosen't then the twitter api won't be able to reach it either and its probably a port forwarding issue (I think). Must sleep, will be back in the morn :)
DannyLane
@DannyLane - my website doesn't show up if i use the ipaddress:3434 so i agree that twitter wont be able to find it as well
ooo
Have a look at http://portforward.com/ to try and get your port forwarded.
DannyLane
A: 

Use a service like No-Ip to setup a static dns name for your dynamic ip and then use it in your api call.

Navi Sidhu
+3  A: 

You can use http://127.0.0.1:port/...

The Twitterizer example application is already setup to test locally.

Ricky (The guy who made Twitterizer)

Ricky Smith
Version 2.1 (in beta, full release in a few days) that supports providing a custom callback url when you obtain request tokens.
Ricky Smith
A: 

If you're integrating this library into your application I would wrap the Twitterizer API in an interface, then mock the implementation while you test.

Steve Horn
A: 

change your hosts file example ;

127.0.0.1 mytwitter.com

add web site on IIS

mytwitter.com and maps your project

Ilyax