Is it possible to run javascript with other target?

Posted by Kristoffer Nolgren on Stack Overflow See other posts from Stack Overflow or by Kristoffer Nolgren
Published on 2012-06-25T21:11:15Z Indexed on 2012/06/25 21:15 UTC
Read the original article Hit count: 241

Filed under:
|
|

I have a facebook app that I authenticate using a general-purpose authentification. Like this:

  // Fixar oAuth
    jso_configure({
        "facebook": {
            client_id: "393963983989013",
            redirect_uri: "http://resihop.herokuapp.com/",
            authorization: "https://www.facebook.com/dialog/oauth",
            presenttoken: "qs"
        }
    });


    // Make sure that you have 
    jso_ensureTokens({
        "facebook": [""]
    });

    // This dumps all cached tokens to console, for easyer debugging.
    //jso_dump();


    jso_ensureTokens({
        "facebook": [""]
    });

It's tirggered on document.ready.

Because it's a facebook app I can't run the authentification in the iFrame. Facebook denies this using X-Frame-Options. The solution, if you authenticate with a link is to use target="_top". How do i Achieve the same effect in javascript? Maybe I need to edit one of the funcitons (though ideally not, as they are part of a library) in that case please point me in the right direction.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery