Comments (7)
Glad it worked for you and I have a fix coming! Essentially just look in the plugin js code and in login first check if there is a session object in localStorage and if not then continue and get the session object and save a copy in localStorage.
from phonegap-facebook-plugin.
Great, I can give it a shot.
Are you planing on checking it in?
from phonegap-facebook-plugin.
oops, didn't mean to close the issue. I thought that "comment & close" button will close the window :)
from phonegap-facebook-plugin.
It seems as though, in my case, session.expires
equals 4001-01-01 00:00:00 +0000
(it's a token with offline permission) whereas new Date().valueOf()
yields something like 1317933785247
. Hence, the comparison fails and the session is never restored.
In other words: please reopen this one. ;)
(More research in progress...)
from phonegap-facebook-plugin.
Also, the current code makes it impossible to determine whether the user gets login feedback at all.
For example; in an actual app we want users to only have to login once (ideally). We do this the first time by displaying a nice login button. However, in the current API there is no way to determine whether this button should be displayed (hence whether an access token is present in local storage).
A better alternative might be to automatically restore the session during the init function, automatically loggin the user in. Then, later, we might explicitly call getLoginStatus
to determine whether the session is valid at all etcetera.
from phonegap-facebook-plugin.
@dokterbob good point. looking into that now. for some reason I went down that path and then decided against it but I will have a second look.
from phonegap-facebook-plugin.
This one seems a dup of #69 and ought to be reopened, probably: the new Date().valueOf()
seems to be still occuring. I remember having fixed this one particular issue - but I guess I have lost the results of that. Will try again.
from phonegap-facebook-plugin.
Related Issues (20)
- Compile Error
- ErrorCode for ios
- Cordova iOS - Facebook Native App callback return issue?
- Turn Texas HoldEm Poker
- Facebook share link not working
- app crash on facebook re-login
- THIS REPOSITORY HAS BEEN ABANDONED. Use the jeduan fork instead!
- miss IOS instruction on documentation HOT 1
- Not Able to Validate Server Side Login Using AccessToken and Fetch Profile Information
- unable to list saved accounts on device
- You can't use Facebook to log into this app or website because there's an issue with its implementation of Facebook Login HOT 1
- Plugin doesn't work on my site
- TypeScript definition support
- UIWebView needs to be removed HOT 1
- Plugin for mobile version of site
- How i can get Deep Link?
- h
- Busco
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 phonegap-facebook-plugin.