How can I customize facebook oauth dialog in javascript?

I would like to change the location of the page url and I would strongly prefer to have the permissions request dialog open in a separate window. This is the JavaScript im using: The dialog that comes up in a separate window doesn't show up in all browsers, freaking IE... PHP: // Create our Application instance (replace this with your appId and secret). $facebook = new Facebook(array( 'appId' => 'XXXXXXXXXXXXXXXXXXXXXXXXX', 'secret' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', )); // Get User ID $user = $facebook->getUser(); if ($user) { try { // Proceed knowing you have a logged in user who's authenticated. $user_profile = $facebook->api('/me'); } catch (FacebookApiException $e) { error_log($e); $user = null; } } // n or logout url will be needed depending on current user state. if ($user) { $logoutUrl = $facebook->getLogoutUrl(); } else { $loginUrl = $facebook->getLoginUrl( array( 'scope' => 'publish_stream,user_birthday,email,offline_access', 'next' => 'LINK HERE', )); }
Can you share the whole code? the above snippet won't prompt the user to install your app!

以上就是How can I customize facebook oauth dialog in javascript?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准