Comments (9)
Thanks for reporting this, @pigalon! The Facebook Pixel Warning
is just a warning and usually not a problem. I've just tested the image again locally and generating a token is working fine for me. Can you please double-check that the provided credentials in FB_USER_EMAIL
and FB_USER_PASSWORD
are correct?
from facebook-token-generator.
Thx @moertel for your reply.
I've created a new FB application with latest 2.9 version of the graph API and I've made a basic configuration about pixel.
Now I get this :
[LOGIN]`
START: Logging into Facebook...
[LOGIN] |- Fill out form
[LOGIN] |- Submit form
[LOGIN] DONE.
[GENERATE TOKEN] Facebook Pixel Warning: Multiple pixels with conflicting versions were detected on this page
[GENERATE TOKEN] Facebook Pixel Warning: Multiple different pixels were detected on this page
[GENERATE TOKEN] START: Opening submenu...
[GENERATE TOKEN] ERROR: Something went wrong. Was not able to find the 'Get Token' button.
[ERROR HANDLER] START: Generating screenshot snapshotting the page at time of error...
[ERROR HANDLER] DONE: Screenshot '/token/generateTokenError.png' saved.
[ERROR HANDLER]
Exiting..
and the new generated png file is generated with the graph api token page and the token is empty.
Do I need a specific Fb app configuration parameter?
Thanks in advance,
Pierrick
from facebook-token-generator.
Good news: With a brand new app I was able to reproduce the error you're seeing. The problem is that the script I wrote will not do the initial authorization for your app+user combination. To solve this, please log in with the FB account you want to use for automation and follow these steps:
-
Visit https://developers.facebook.com/tools/explorer/{YOUR_FB_CLIENT_ID}
-
Click "Get Token"
-
In the dropdown, click "Get User Access Token"
-
In the popup, choose the scopes you need
-
Click "Get Access Token"
-
Now the OAuth screen opens and you need to confirm that the app may access your account:
You only need to do this once. Afterwards, you should be able to use the Docker image to generate tokens for you. I realise this is not made explicit anywhere; I'll add it to the README. My use case only ever was to automate for existing apps, so I never ran into this issue. Thanks for pointing it out and taking the time to report.
from facebook-token-generator.
@pigalon: I worked on the code and improved the logging; please try again with image moertel/facebook-token-generator:1.1
and let me know if it works for you.
from facebook-token-generator.
@moertel thanks for this new version.
I've tried with the following command : docker run -e FB_CLIENT_ID=xxx -e FB_CLIENT_SECRET=xxx -e FB_USER_EMAIL=[email protected] -e FB_USER_PASSWORD=xxx -v /Users/mypath/tokens/fb:/token -it moertel/facebook-token-generator:1.1
I got the same issue but in the captured image now there is a token. The size is truncated.
Thanks,
Pierrick
from facebook-token-generator.
Ok I've understood,
I've just changed the language (was French for me) to english and the js script found the correct button now and I got the shortLivedAuthToken.txt file.
Thanks again for your support,
Regards,
Pierrick
from facebook-token-generator.
Glad it works now, Pierrick!
from facebook-token-generator.
@pigalon FYI, I've exposed the button texts as environment variables now, so if you care about continuing to use Facebook in French, you should be able to do so, i.e. setting FB_BUTTON_TEXT_GETTOKEN="Obtenir le token"
and so on:
https://github.com/moertel/facebook-token-generator#languages-other-than-english
from facebook-token-generator.
@moertel it's perfect! I will test it.
Thanks again.
Regards,
Pierrick
from facebook-token-generator.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from facebook-token-generator.