fb_token
fb_token copied to clipboard
Making it work
Thank you for the script! I'm not sure if Facebook is even providing long-term access tokens for apps anymore, they change everything around all the time, I personally am having a hard time keeping up. My app worked great for years, I kept up with the changes for at least nine years, and eventually they made so many changes at once that my app just broke down and I didn't have time to fix it. Now in 2023, after being down for 4-5 years, I'm putting some effort into maybe getting it up again.
If there are still long term access tokens for apps, I feel like I may be close to getting it to work. I changed the scope on line 16 to just - public_profile and I was getting:
Can't Load URL
The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings.
So I put in facebook.com and www.facebook.com into the domains list. That didn't help, same exact error message in the browser.
So then, for some reason I changed line 16 so the callback url was the url of my game/app. I continued with the instructions and pasted that back into your script dialog. The output of your script was:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 239 100 239 0 0 1105 0 --:--:-- --:--:-- --:--:-- 1106
exchange got: {"access_token":"EAANDgJFNhsQBANF2ZBkVLrIilRKhIfZCmT7smsRvSqVxOUbLYB0YK9VqACwJxUwk2poaDnPYFRtNSZAqMaRxEmcUufMQqxDWRLNkYt8oOeeFMsnzWenrJxpLk4ZBfUME4ZAAZBPEpryQgMHMxWey1LUuOP6WR0AbQcKHGHOUvyyQZDZD","token_type":"bearer","expires_in":5179645}
Failed to get long-lasting token.
{"access_token":"EAANDgJ ... UvyyQZDZD","token_type":"bearer","expires_in":5179645}
So that didn't seem to help, either. But then I noticed the url actually contained something that said:
...&long_lived_token=EAANDgJFNhsQBANIB8ZC5SKHJYpXjEqgrqpg1o6ZBZAXUDxZBfbADZA55rTixgx4PpyN1TH6LZCvBQrHhBtE6hAk611NR9ZB6kLOysxnYmZAZC5HknxOfdq61cjHxd2cCX77OTuNeNb80RMcCO3EDbFbVzZCUy2cY4TOjZCGGZA6Ugr5TZBTjpTG6FyM2o
Notice that it's got a parameter 'long_lived_token'!
So I pasted that token directly into my app! Didn't work, choked the app login.
So I changed line 39 of your script to read like:
token="$(echo $Y | sed -e's,.*long_lived_token=\(.*\)&.*,\1,g')"
Which also didn't help, that made the output choke even more it seemed like, outputting:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 162 100 162 0 0 891 0 --:--:-- --:--:-- --:--:-- 890
app {"error":{"message":"Expected 1 '.' in the input between the postcard and the payload","type":"OAuthException","code":190,"fbtrace_id":"Ad9M3Kc7UYzTgLddhVDBPAd"}}
Could not use token https://avmblaster.com/?#access_token=EAANDgJFNhsQBA ... gks1Q2W7&data_access_expiration_time=1687216667&expires_in=6133&long_lived_token=EAANDgJFNhsQB...q0ebbpmxjk.
{"error":{"message":"Expected 1 '.' in the input between the postcard and the payload","type":"OAuthException","code":190,"fbtrace_id":"Ad9M3Kc7UYzTgLddhVDBPAd"}}
(Expected 1 '.' in the input between the postcard and the payload)
Since I really don't understand line 39, I thought, well, maybe it used to look for that after the first & sign, and now there's more than one. So I changed the url, before I pasted it, to:
https://avmblaster.com/?bla=1&long_lived_token=EAAND ... PixE
Which just spit out the same error message, which I read more closely this time, seeing it is expecting a period somewhere. So first I tried one more time by just moving the long_lived_token up to behind the access_token parameter, and finally, grasping, I tried randomly adding a dot in as a parameter:
https://avmblaster.com/?#access_token=EAAN...HS&data_access_expiration_time=1687217537&expires_in=5263&&dot=.&long_lived_token=EAA...900fy6
No dice.
Then finally I noticed the script is just building up to the curl line 63, so I just put the access token returned in the url, the id and secret and manually ran that curl line. It seemed to spit out an access token with a longer timeout. I stuck that directly into the app ...and...
Still no dice.
Then I thought I'd try the same thing but with the long_lived_token, and I got back from facebook: 'Missing redirect_uri parameter.'
So I put redirect_uri=https://my-app-url and:
{"error":{"message":"Invalid grant_type: 'fb_exchange_EAA...NriHFy'. Supported types: authorization_code, client_credentials","type":"OAuthException","code":100,"fbtrace_id":"AkFdl....ApV"}}
I think I'm out of ideas, but it was fun anyway, trying all that stuff.
So, skeptical that facebook is even providing long-term access tokens for apps anymore, I'm currently stuck, perhaps at the end of the script it looks like, maybe, but again, I've changed line 16 to have scope=public_profile, and the callback in the url on line 39 to be https://my-app-url.
Seeing 'long_lived_token=...' in the url I'm pasting is making me wonder if indeed there may be light at the end of the tunnel, but I'm just not sure.
If anyone knows if I'm shooting in vaguely the right direction, or how to fix it, or how to get a long-lived-access token, or if I even need one anymore, any hints are greatly appreciated.
Thank you, -Arlon
the best method i ever try
long-term token using the Facebook Lite + App Cloner APK and until now, it's still working well...
Check out the tutorial video here => https://youtu.be/zcQ_YW8IktU