Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am developing a Facebook application with FB JavaScript SDK. I need email permission on start of the application I am using OAuth Dialog. Here is the code:

<html xmlns:fb="https://www.facebook.com/2008/fbml">
  <body>
    <script src="http://connect.facebook.net/en_US/all.js"></script>
    <div id="fb-root"></div>
    <script>
      // assume we are already logged in
      FB.init({appId: '*************', xfbml: true, cookie: true, oauth: true});

      FB.login({
        scope: 'email,user_birthday',
      });
     </script>

     <a href="https://www.facebook.com/dialog/oauth/?
  scope=email,user_birthday&
  client_id=148244388606048&
  redirect_uri=https://apps.facebook.com/projectatestapp/test2.html&
  response_type=token"> test</a>
  </body>
</html>

But when I hit the URL https://apps.facebook.com/projectatestapp/test2.html, I see the test link. When I click at link some screen flashes and then I am directed to the Facebook page On which a big Facebook button is placed and when I click on that big fb icon button then I see the permission window

Now I dont know what I ma doing wrong as I dont want to see the big fb button in process of my application permission window. How to skip it?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
189 views
Welcome To Ask or Share your Answers For Others

1 Answer

Add the target="_top" attribute to your link <a>, this way the link will open on the top window instead of within the iframe.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...