views:

884

answers:

3

I can't get my Yahoo! Application Platform to run I keep getting denied access even though their policy file accepts requests from any domain.

OK: Policy file accepted: http://social.yahooapis.com/crossdomain.xml
Error: Request for resource at http://social.yahooapis.com/v1/user/&lt;user id>/profile?oauth_signature_method=HMAC-SHA1&lang=en-US&oauth_consumer_key=<key>&oauth_token=<long ass token>&oauth_version=1.0&format=json&oauth_nonce=<blah blah>&oauth_timestamp=1262846353&region=US&oauth_signature=<foo bar> by requestor from http://&lt;my domain>/YOSSimple.swf is denied due to lack of policy file permissions.

The url works btw, I editted some stuff out since it has my keys and stuff.


Links to the stuff I'm trying to do

http://developer.yahoo.com/flash/yos/
http://developer.yahoo.com/flash/yos/examples/simple/YOSSimple.fla

YOSSimple properly creates the url actually since if I type it in my browser I'm prompted if I want to download the file that contains information regarding my profile.

But it just wont open it in Flash.

A: 

I'm guessing that it's not loading the policy file automatically. You should try using Security.loadPolicyFile("http://social.yahooapis.com/crossdomain.xml");

Do you have a webproxy installed with which you can monitor what files exactly are loaded? My favorite is Charles but there are also free FF plugins like Httpfox

EDIT: I think I know what's going wrong. It's going wrong the other way around, the swf from yahoo is trying to access your swf, but doesn't have the correct permissions. Would you try

Security.allowDomain( 'http://social.yahooapis.com/' );
Creynders
Already tried manually loading the policy, still didn't work. Will try that webproxy thing in a few.
lemon
The files are being loaded no problems there. [http://social.yahooapis.com/crossdomain.xml, YOSSimple.swf, etc]. It says that it loads the SWF first before the XML tho, would that be the problem?
lemon
No, that's how it should be.BTW, I edited my answer, I think I know what's going wrong.
Creynders
Still doesn't work, same error.
lemon
Grrr! :-)Then I'm out of ideas... If you do find it, could you post the solution? I'm really curious now!
Creynders
If I ever do :( but I kinda moved on, I used their PHP SDK instead=..=
lemon
I think that the argument to allowDomain should be just "social.yahooapis.com." Of course, you could use "*" to check if that's even related to the problem.
Jacob
A: 

http://www.ieinspector.com/httpanalyzer/

use HTTP analyzer to see whats happening?

also check your not missmatching http://www. with http:// because flash treats them as different domains

also are you running the code locally on your machine. It could be your local security settings

PeanutPower
A: 

There doesn't appear to be a crossdomain file when you browse to http://social.yahooapis.com/crossdomain.xml

But there is one at developer.yahooapis.com/crossdomain.xml, http://search.yahooapis.com/crossdomain.xml and others..?

Trevor Boyle