Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7821053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T07:31:26+00:00 2026-06-02T07:31:26+00:00

I am trying to follow the steps mention here http://developers.facebook.com/docs/authentication/devices/ to get the authentication

  • 0

I am trying to follow the steps mention here http://developers.facebook.com/docs/authentication/devices/
to get the authentication from user. I execute the following python script.

#!/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)

I get the following OutPut:

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}

Am I missing something here? I also try to replicate the request as given here
http://oauth-device-demo.appspot.com/ But I couldn’t get any success.

I tried to search over the net but couldn’t get any thing working. Please help.
Any kind of help is greatly appreciated here.

Edited:
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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T07:31:28+00:00Added an answer on June 2, 2026 at 7:31 am

    It’s actually pretty clear that you not white-listed for usage of Device Authentication.

    Citing the docs

    we are currently testing Device Authentication with a limited number of partners. It is not currently available for general use, and we are not accepting additional applications for access.

    The OAuth 2.0 Device Authentication Flow demo you refer to developed by Simon Cross (who is Facebook employee) and (probably?) allowed to use that flow.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying set up an execution account following the steps here: http://msdn.microsoft.com/en-us/library/ms156302.aspx I follow
I am trying to follow the steps on the following site http://msdn.microsoft.com/en-us/library/ms181089(VS.80).aspx But I
I am trying to follow the setup on http://hide1713.wordpress.com/2009/01/30/setup-perfect-python-environment-in-emacs/ I have steps 1 -
I am trying to follow the steps here: http://dev.svetlyak.ru/optional-email-in-django-comments-en/ to make the Email Address
I'm trying to follow a simple example of AJAX-enabled WCF Service like: http://www.pluralsight.com/community/blogs/fritz/archive/2008/01/31/50121.aspx I'm
I am trying to follow the steps of a Simple COM Tutorial which looks
I have installed MVC 3 and now I'm trying to follow these steps: http://www.asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-1
While trying to follow the python-libmemcached instructions at http://code.google.com/p/python-libmemcached/ I run into trouble at
I'm trying to follow the example on the dev guide : http://developer.android.com/resources/tutorials/views/hello-tabwidget.html I don't
Im trying to follow a tutorial that is using SBJsonParser to get twitter feeds,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.