Spoof your device while logging into Facebook - The Logical Kid

This post is all about helping you spoof the device name while you login into facebook. On successful execution of this trick (or whatever) you can achieve the following result:

All set?
Lets go!

To start with this, you need to have a facebook application, and the facebook-javascript-sdk code from the following link:
https://developers.facebook.com/docs/facebook-login/login-flow-for-web/v2.2
Copy the code from the 'Quickstart' section.


Note down the application id (appID) of your application.
Replace the value in the code with your appId.



Save the file in your htdocs or www folder of your server at localhost, or some remote host.
I have saved it as t.html in the /var/www/facebook-sdk-env/ folder of my apache server.
Time to execute.

Next is what?
Just open the the file on your server in the browser.
You will be shown the following output:

You will be asked for your facebook credentials, as follows:

 



Upon logging in, you will be displayed with a statement as follows, just to confirm if you have successfully logged in:

Besides this, the activity will be logged in the Security Settings with the device name shown as your application name.
Bingo! Now create applications with some funky names and confuse the person with your devices, and make them believe that you have accessed your facebook account with an iPhone 6Plus, even if you don't have one. Anyways, there's much to it if you can tweak user-agents of your browser a little bit to spoof the Operating System as identified by facebook. For automation and/or easiness, you can use any user-agent switcher plugins anyhow.


Have fun!