Twitter ouath callback in Spotify Apps

女生的网名这么多〃 提交于 2019-12-13 08:19:54

问题


How can I set a twitter callback, it doesn't support sp://

my code is

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:


auth.showAuthenticationDialog works by watching for requests to the URL given in the second parameter, then intercepting them and passing it to you in the callback instead.

With that in mind, you can set the callback URL to whatever is needed for Twitter's API — for example, http://mywebsite.com/twitterIsDone — the request to http://mywebsite.com/twitterIsDone will be intercepted for you and will never actually take place.



来源:https://stackoverflow.com/questions/9531709/twitter-ouath-callback-in-spotify-apps

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!