开发者

Facebook Connect Dialog

开发者 https://www.devze.com 2023-04-10 17:01 出处:网络
I have a question with regards to the facebook dialog. Basically, I would like to popup the dialog for the user to enter their credentials. Once they are authorized, I want the callback Url to be cus

I have a question with regards to the facebook dialog.

Basically, I would like to popup the dialog for the user to enter their credentials. Once they are authorized, I want the callback Url to be custom (but on same domain as specified in website url).

However, the FB.login method only takes 2 params: callback fcn and scope.

Any ideas how I can change th开发者_运维问答e callback url once the user has logged in?

Thanks


If I recall, the redirect URL is set under the settings for your application inside the Facebook developer site.

Although, wouldn't just doing the redirect in the callback function work? e.g. with window.location.href = "whatever"?


Use FB.Event.subscribe to detect when a user logs in.

FB.Event.subscribe('auth.authResponseChange', function(response) {
  // can redirect to your callback URL here if necessary
  alert('The status of the session is: ' + response.status);
});
0

精彩评论

暂无评论...
验证码 换一张
取 消