title: facebook-php-sdk loginurl api error code 100
body: <p>I'm trying to create a facebook login url using Facebook PHP SDK (v.3.2.0) from 
  <a href="https://github.com/facebook/facebook-php-sdk" rel="nofollow">https://github.com/facebook/facebook-php-sdk</a>
  below is my code</p>
  
  <pre><code>$config = array(    'appId'  =&gt; '***',  
                      'secret' =&gt; '***',  
                      'cookie' =&gt; true 
                      );
  require_once("facebook.php");
  
  $facebook = new Facebook($config);
  
  $params = array('scope' =&gt; 'user_birthday, user_location, email',
                  'redirect_uri' =&gt; "http://my_domain.in/user/fb",    
                  'display' =&gt; 'popup'
                  );
  $loginUrl = $facebook-&gt;getLoginUrl($params);
  </code></pre>
  
  <p>the problem is when the loginUrl is clicked it will give error from facebook as below:</p>
  
  <blockquote>
    <p>API Error Code: 100 API Error Description: Invalid parameter Error
    Message: Display type <strong>popup</strong>. isn't valid on www.facebook.com. You
    should access a different domain (m.facebook.com, www.facebook.com),
    or use one of the following supported display types: page, <strong>popup</strong>,
    iframe, touch, none</p>
  </blockquote>
  
  <p>the question is where did i go wrong?
  fyi, the very same code were fine before, somehow it's not working now, i kinda missed when the problem actually happen at first, but in between i did upgrade the facebook-php-sdk from 3.1.1 to 3.2.0, n possibly the domain and url settings in my facebook app.</p>
  
  <blockquote>
    <p>app domain : my_domain.in
    site url : <a href="http://www.my_domain.in" rel="nofollow">http://www.my_domain.in</a></p>
  </blockquote>
  
  <p>furthermore,
  even my i changed the params into</p>
  
  <pre><code>$params = array('scope' =&gt; 'user_birthday, user_location, email',
                  'redirect_uri' =&gt; "http://my_domain.in/user/fb"
                  );
  </code></pre>
  
  <p>i still receive an error with different message</p>
  
  <blockquote>
    <p>API Error Code: 100
    API Error Description: Invalid parameter
    Error Message: Unsupported scope: '<strong>email</strong>.'. Supported scopes: ads_management create_event create_note <strong>email</strong> export_stream friends_about_me friends_activities friends_birthday friends_checkins friends_education_history friends_events friends_games_activity friends_groups friends_hometown friends_interests friends_likes friends_location friends_notes friends_online_presence friends_photo_video_tags friends_photos friends_questions friends_relationship_details friends_relationships friends_religion_politics friends_status friends_subscriptions friends_videos friends_website friends_work_history manage_friendlists manage_notifications manage_pages offline_access photo_upload publish_actions publish_checkins publish_stream read_friendlists read_insights read_mailbox read_page_mailboxes read_requests read_stream rsvp_event share_item sms status_update user_about_me user_activities user_birthday user_checkins user_education_history user_events user_games_activity user_groups user_hometown user_interests user_likes user_location user_notes user_online_presence user_photo_video_tags user_photos user_questions user_relationship_details user_relationships user_religion_politics user_status user_subscriptions user_videos user_website user_work_history video_upload xmpp_login</p>
  </blockquote>
  
  <p>please help,
  thanks.</p>