yoka / qmlfb Goto Github PK
View Code? Open in Web Editor NEWTiny example how to authenticate people via FB in QML
License: MIT License
Tiny example how to authenticate people via FB in QML
License: MIT License
THIS PROJECT IS NO LONGER MAINTAINED OR UPDATED! THERE MIGHT BE SOME FORKS AROUND THAT ARE MORE UP TO DATE. OR MIGHT NOT. /* * * * QMLFB version 0.1b by Jesse Ikonen * =======================================* * * Simple QML Component that authenticates your users using Facebook Graph. * * */ Usage: * Use like any file component. Facebook application id property is required: Facebook { id: facebook property string facebook_display_style: "touch" // or "wap" property string facebook_application_id: "<YOUR FB APP ID HERE>" function whenUserIsAuthenticated(userid, usertoken){ // access graph to get my name my_graph(function(){main.name = this["name"]}); } } * Some properties you can hook into: facebook.user_is_authenticated => returns if user is authenticated or not (bool) facebook.user_facebook_id => returns user fb id facebook.user_facebook_token => returns user fb token facebook.my_pic_url => returns your picture url (string) facebook.me => returns your fb graph data (variant) so you can do things like, text: facebook.me.name * Access functions to graph are not done yet, but you can use getJSON helper from helpers.js if you really need something else. Thank you.
Dear yoka,
I'm developing a few apps for Symbian 3 with QML that needs to optionally extract name, surname and photo from Facebook user.
I'd like to use your QMLFB, but unfortunately I've seen that your code extracts the user_id from the token, which if I'm not wrong is impossible due to a radical change of the token from October 2011.
It could be possible to work with you and achieve a new version that get the user_id with the new method "/me?fields=id" ?
I give you a starting clue
http://stackoverflow.com/questions/3546677/how-to-get-the-facebook-user-id-using-the-access-token
This problem could be fixed by qtwebkit or by facebook. It manifests when 'touch' display is used and JS turned on.
The reason for this issue is that FB tries to position that bar to bottom of the screen, and webview tries to be dynamic in size, so the bar scrolls to infinity.
For now the problem is circumvented by turning JS off and following js redirects manually.
Hello Yoka,
I have been trying your qml for one of my application...so wodering if I could make user login and password persistence..meaning when user exits application and logs in again then previous user id and password should remain intact in that login page, so that user doesn't need to type his credentials again. Do you have any solution to this using your qmls...?
Thanks in advance!
pksmobile
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.