Has anyone here been able to connect to the Sina Weibo API?
I hit a brick wall when it comes to the callback URL.
I seems it will only allow a root folder as URL
so www.example.com works but www.example.com/sina doesn't
anyone knows a work around?
thanks
In case anyone has the same problem, you have probably entered the URL under the "security" heading rather than the Authorization settings heading (at the top) on the developer settings page). The URL it is asking for in the security section is a base url with which the application can be used (hence why it only takes .com domains) whereas the one above can take any format that you want your callback url to be.
Hope that helps, the settings page in question is here:
http://open.weibo.com/apps/yourappid/info/advanced (replacing the your app id as appropriate)
Do you mean Sina OAuth callback page? Your callback URL should be URL encoded according to the API document. Maybe that's your problem.
I m using PHP libweibo http://code.google.com/p/libweibo/
i m succesfully implement that script demo.
i m facing that problem too.
if youare using oauth2.0,
you need to make sure that your callback FILE exactly same as callback URL in weibo apps page.
Related
I have an app (similar to the Employee Directory example) that pulls down a JSON file from the client's server on a daily basis (Business Continuity info that rarely changes).
Currently I have the URL as a variable in my globals.js which points to their internal web server.
They now want to make the URL variable point to a URL which is in fact a URL redirect. The redirect will be dynamic (well, sort of) that will point to where the file resides.
The "autoRedirect" property does not seem to be working for this on either the iOS or Android builds.
Does anyone have any ideas as to how I can do this?
Could it be that the redirects switches protocol? Like from http to https or visa versa? Because that might indeed not work as its considered bad practice.
If not, then it it looks like you've found a bug. Please check if this is a known issue at the Appcelerator JIRA. If it's not, create a ticket, link to this question but also provide reproducible code, steps and environment information in the ticket itself. Don't forget to drop a link to the ticket here so that others can watch it with you.
I have a site on a subdomain (www.website.com/foobar) which pulls the default page view. Due to the nature of MVC apps, this default page view can also be reached through the "controller/action" URL of the default content (www.website.com/foobar/{controller}) and (www.website.com/foobar/{controller}/{action}).
For the sake of analytics and tracking, I would like any of these other URLs, besides the original short (www.website.com/foobar), to redirect back to this shorter URL.
So...
www.website.com/foobar/{controller}, when typed in, or clicked on in a bookmarked link, should redirect to www.website.com/foobar
I've tried playing around with the routing, but couldn't get anything to actually change the URL itself. I'm not sure if it's possible to change through mapping.
Edit: Has anyone used the HTTP Redirect within IIS7? I can redirect from the top tier, but cannot seem to get the redirect to work on any of the Views.
I don't think you can use routing alone to redirect up a domain. I had a similar issue and after a few days of searching and asking around, I ended up using Redirect itself to get over the issue. Hope this helps.
I was able to solve the problem in IIS 7 by using the HTTP Redirect module. Because it's an MVC application it was a little trickier to setup a redirect on a view, but it's possible. I used this tutorial: Creating a redirect in IIS7
Edit: While the above solution works, it tended to be unpredictable. I ended up solving it by reading the URL the user was inputting in the Index action of the Quote controller, and then redirecting if keywords I was looking for were in the URL. Just a simple if statement at the beginning of the Index action.
I am developing a website using Microsoft MVC3, and have built it upon the default MVC3 Application template. It accesses an external database and works on localhost.
I have deployed it to a shared server I rent from storminternet via the publish tool using ftp method (storminternet do not yet support web deploy), and it runs well. It accesses the database okay and get requests work fine.
However, any form that submits via POST protocol returns page not found error 404 (this is on actions where I have asserted [HttpPost]).
Storm internet assure me that POST and GET are allowed by default, and since the helpdesk are not developers, I'm unsure who to turn to. I don't have an excellent understanding of web.config, although I can read and understand xml and see what's going on by reading through and googling. I have tried adding the protocols to the root web.config, and I think I might be barking up the wrong tree.
Has anyone else had this problem, or might anyone know how to help me?
To replicate my error, my site is here... 213.229.125.117/$sitepreview/ase-limited.com/Dev (sorry it isn't blue. The dollar gets parsed to % something)
and the quickest route to a POST request is to click 'Add Building' at the top of the left-hand side and then click 'Save' at the top of the dialogue box.
Any help will be gratefully received. I've been stuck on this for days without luck.
Best Regards
Nick
STOP-PRESS-STOP-PRESS-STOP-PRESS-STOP-PRESS-STOP-PRESS-STOP-PRESS-STOP-PRESS-
It turned out to be a known issue with sitepreview. Switching to the proper domain sorted everything.
I have noticed that you have some 404 javascript errors when performing your AJAX requests. For example you have a request to:
http://213.229.125.117/$sitepreview/ase-limited.com/BuildingManager/Employees/2
instead of:
http://213.229.125.117/$sitepreview/ase-limited.com/Dev/BuildingManager/Employees/2
Notice how /Dev is missing. That's because in your javascripts you have hardcoded your urls instead of using url helpers to generate them. For example you wrote something like this:
$.ajax({
url: '/BuildingManager/Employees/2',
....
});
which works fine on localhost because you don't have a virtual directory name but doesn't work when you deploy on your server because now the correct path is:
$.ajax({
url: '/Dev/BuildingManager/Employees/2',
....
});
For this reason you should absolutely never hardcode urls like that.
And when I try to POST the form in tries to post to http://213.229.125.117/Dev/BuildingManager/SaveBuilding which seems a very weird url as it is missing the whole beginning. Once again: never hardcode urls. Always use url helpers.
I have a e-commerce website built in Ajax and Js, when the user type a search keyword the list is pulled via ajax but the browser url, in my case doesn't change, so if the user reaload or simply bookmarks the address he 'll have to start form scratch loosing the keywords input.
i noticed Google instead rewrites the url with the complete query, no hashtag or complex workaround...apparently
how can i achieve that? consider i have complete control on my server so i can set my apache in any way i want.
thanks!!
See this question, almost the same except they used Facebook as a example.
How does facebook rewrite the source URL of a page in the browser address bar?
If you watch the URL in Google Instant, it doesn't change until you hit "Search" or pause for a set period of time (2 seconds, i think).
After this delay, Google refreshes the page with those search queries.
I'm not sure what browser you're using, but I get all the search terms after a hashtag in Chrome (e.g., http://www.google.com/#sclient=psy&hl=en&q=test+test+sibilance&aq=3&...). I don't think what you think is occurring is actually happening. It could be done on Chrome and other HTML5 browsers using history.pushState(), but I don't see Google Instant using that method.
Then it is not instant. Without reloading the page you can only change the fragment identifier in the URL.
My experience is, that after you changed the search, the Google URL is no longer "correct", i.e. it does not represent the latest query.
Hi I have a problem where I'm setting up an internet Kiosk in a public place and when a user goes to a certain URL I want it to redirect to another particular URL.
For example I want it setup so that if a user goes to www.example.com/step1 I want the browser to automatically go to www.example.com/step2
The only restriction here is that it has to work on Windows due to hardware limitations.
Does anybody know how I could do this?
Thanks
A couple of ways to do it:
Implement a Browser Helper Object, catch the BeforeNavigate event, cancel the navigation and direct it somewhere else.
Use a specialized proxy server that responds to a request for the first URL by returning a redirect to the second, and passes all other requests through.
You could try to modify the Hosts file. In Windows, I think it is found in WINDOWS/system32/drivers/.
It can be used to redirect a request for one IP address to another.
Hope that's useful.