Spotify应用程序中的Twitter oauth回调

时间:2012-03-02 10:27:52

标签: spotify

如何设置Twitter回调,它不支持sp://

我的代码是

auth.showAuthenticationDialog('https://api.twitter.com/oauth/authorize?oauth_token=' + result.oauth_token, 'sp://geoholium',{ 
                            onSuccess: function(response) {
                                authenticated = true;
                                access_token = response.split('=')[1];
                            },
                            onFailure: function(error) {
                            },
                            onComplete: function() { }
                        });

1 个答案:

答案 0 :(得分:0)

auth.showAuthenticationDialog通过观察第二个参数中给出的URL请求,然后拦截它们并在回调中将它传递给您。

考虑到这一点,您可以将回调网址设置为Twitter API所需的任何内容 - 例如,http://mywebsite.com/twitterIsDone - 对http://mywebsite.com/twitterIsDone的请求将被截获并且永远不会发生