0

Is there a way to get a fb access token WITHOUT using the fb SDK and without user interaction. Just using a hardcoded user:password string, something like john:123456, i know about...

https://facebook.com/dialog/oauth?client_id=<app-id>&redirect_uri=https://www.facebook.com/connect/login_success.html&scope=<permissions>&response_type=token

and then using something like htmlunit to get the token, but that process is way too heavy for a phone so i was thinking in something lighter... any ideas? any codes? any examples? i couldn't find anything on the net

Please don't throw me to "https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow/v2.1" or tell me "use the sdk is the best way"

D.Snap
  • 1,704
  • 1
  • 22
  • 15
  • I can't say this with 100% conviction but I don't think you can no. The reason for this would be security based, so you will need to use a method FB provides or not at all. You may want to add the language you are writing in to to get more answers/ – tim.baker Oct 08 '14 at 07:51
  • Is totally possible, mimic a browser using htmlunit, but i would like to do it in pure java code and i was hopping something like this was already done – D.Snap Oct 08 '14 at 08:12
  • Asking for the FB user's username and password is against platform policy https://developers.facebook.com/policy so this is a great way of getting your app shut down. – Ming Li Oct 08 '14 at 17:35

1 Answers1

0

It's not possible to get Access Tokens without user interaction, because the OAuth process requires the user to give permissions to use his data.

See

Tobi
  • 31,405
  • 8
  • 58
  • 90
  • Is possible i did it with htmlunit using the URL i put in my question, but implementing that in a phone is WAY to heavy because all the htmlunit stuff, so the way to go is just sniffing all the data that a browser sends to fb and then implementing it in java, but that will not be fun to do, actually a nightmare, so i was hopping something like this was already done – D.Snap Oct 08 '14 at 08:10
  • Scraping is forbidden by the Facebook Platform Policies. I suppose it's also forbidden to bypass the user confirmation for the OAuth process. – Tobi Oct 08 '14 at 08:28