title: Trying to get the Facebook authentication using python3.2
body: <p>I am trying to follow the steps mention here <a href="http://developers.facebook.com/docs/authentication/devices/" rel="nofollow">http://developers.facebook.com/docs/authentication/devices/</a> 
  to get the authentication from user. I execute the following python script.</p>
  
  <pre><code>#!/usr/bin/python3.2
  import os
  import urllib
  import json
  
  data = urllib.parse.urlencode({'type': 'device_code','client_id': 439862919363245,'scope':})
  data = data.encode('utf-8')
  request = urllib.request.Request("https://graph.facebook.com/oauth/device")
  request.add_header("Content-Type","application/json;charset=utf-8")
  try:
      response = urllib.request.urlopen(request,data)
      httpcode = response.getcode()
      responseData = response.read()
      dataMap = json.loads(responseData.decode())
  except Exception as e:
      print ("Exception : "+str(e))
  
  if httpcode != 200:
      print('Error : code :'+httpcode+', data : '+data)
      sys.exit(1)
  
  print("Success : ")
  print(dataMap)
  </code></pre>
  
  <p>I get the following <strong>OutPut:</strong></p>
  
  <pre><code>Exception : HTTP Error 400: Bad Request
  Success : 
  {'username': 'hamepal', 'first_name': 'Rakesh', 'last_name': 'Kumar', 'name': 'Rakesh Kumar', 'locale': 'en_GB', 'gender': 'male', 'id': '713371871'}
  
  The output is really strange. According to document I should have received the data similar to as following.
  {"code":"64a99b030985f39a93b2608a4713e758","user_code":"E5MV1N","verification_uri":"http://www.facebook.com/device","expires_in":1800,"interval":5}
  </code></pre>
  
  <p>Am I missing something here? I also try to replicate the request as given here 
  <a href="http://oauth-device-demo.appspot.com/" rel="nofollow">http://oauth-device-demo.appspot.com/</a> But I couldn't get any success.</p>
  
  <p>I tried to search over the net but couldn't get any thing working. Please help.
  Any kind of help is greatly appreciated here.</p>
  
  <p><strong>Edited:</strong>
  Now when I use the client_id same as given in the example then it works fine. According to notice put on the page, seems like they are still not supporting any other device yet. And I have to look for Authentication flow for my application.</p>