Guys, Good News is - I have cracked it.
Just need to see ways around managing tokens and need to perform some basic testing.
I will post modifications tonight.
facebook login problem
- Jan
- Phoca Hero
- Posts: 47810
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: facebook login problem
Hi, for now:
- I am able to store the long session and use it (it means user can use the session for two months, the problem is you are not able to manage such session which is very difficult for testing)
- the links above (guides) are in fact not solving maintaining long session, so in fact they work but you need to login everytime you are logged out
- next problem - getLogoutUrl does not work, clicking on logout button does not log you out - typically for facebook guides - a lot of guides about this problem but no solution
So still in work (two main issues should be solved - manage session and make the logout working)
Jan
- I am able to store the long session and use it (it means user can use the session for two months, the problem is you are not able to manage such session which is very difficult for testing)
- the links above (guides) are in fact not solving maintaining long session, so in fact they work but you need to login everytime you are logged out
- next problem - getLogoutUrl does not work, clicking on logout button does not log you out - typically for facebook guides - a lot of guides about this problem but no solution
So still in work (two main issues should be solved - manage session and make the logout working)
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 9
- Joined: 25 Dec 2012, 21:22
Re: facebook login problem
Yes, same issues that I encountered.
The workaround that I found for an expired token strangely is to close the browser window and relogin.
The workaround that I found for an expired token strangely is to close the browser window and relogin.
- Jan
- Phoca Hero
- Posts: 47810
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: facebook login problem
Hi, I am now trying own solution, so maybe this will work, I hope, tonight or tommorrow I will be able to release new version (the issue I am solving now is, what happened when the session will end - the session is set for 60 days and I didn't find any solution how to destroy it manually - so maybe this will be the only one issue - no error handling when session ends - relogin and repasting the data will be needed in every case)
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 9
- Joined: 25 Dec 2012, 21:22
Re: facebook login problem
But the problem with maintaining 60 day session is - its just a replacement for the deprecated offline_access.
Facebook might take it down anyday. Plus I suppose you need to set something in the app to support it.
Facebook might take it down anyday. Plus I suppose you need to set something in the app to support it.
- Jan
- Phoca Hero
- Posts: 47810
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: facebook login problem
Hi, this way is working for me now (I will prepare the changes for new version and will release it hopefully tonight):
- user is logged in, will paste the data in Phoca Gallery administration (works the same way)
- the access token is pasted there and saved in database (is valid for 60 days)
- user can download, upload images from facebook/to facebook
- in case the access token will expire, user get information that he should go to phoca gallery - facebook and edit its profile (log in, and paste new data with new access)
So for now this should work and as displaying images is independent to login function, there is no problem to work this way (to upload/download images withtin 60 days, in case it is expired, just login with facebook and reenter new access token)
Jan
- user is logged in, will paste the data in Phoca Gallery administration (works the same way)
- the access token is pasted there and saved in database (is valid for 60 days)
- user can download, upload images from facebook/to facebook
- in case the access token will expire, user get information that he should go to phoca gallery - facebook and edit its profile (log in, and paste new data with new access)
So for now this should work and as displaying images is independent to login function, there is no problem to work this way (to upload/download images withtin 60 days, in case it is expired, just login with facebook and reenter new access token)
Jan
If you find Phoca extensions useful, please support the project
- Jan
- Phoca Hero
- Posts: 47810
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: facebook login problem
Hi, please test version 3.2.3 (for me importing FB albums, exporting FB albums, login to FB and logout from FB works)
https://www.phoca.cz/news/661-phoca-gall ... 3-released
Please let me know.
Jan
https://www.phoca.cz/news/661-phoca-gall ... 3-released
Please let me know.
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 1
- Joined: 30 Dec 2012, 12:45
Re: facebook login problem
jestli něco uznám je to ochota a ta tady z vaší strany je bez pochyb na lepší úrovni než u komerčních aplikací. Perfektní.
edit: málem bych zapomněl Vše nej do nového roku a vše co se kolem toho povídá
edit: málem bych zapomněl Vše nej do nového roku a vše co se kolem toho povídá
-
- Phoca Newbie
- Posts: 9
- Joined: 25 Dec 2012, 21:22
Re: facebook login problem
Sorry, but I am on the joomla 3.x branch.
Waiting for alpha 3 to test.
But was going through the code. Most of it matched with mine except models > phocagalleryc.php
$dataImg[$i]['extid'] = $value['id'];
$dataImg[$i]['title'] = $value['name']=='' ? $noImageTitle : PhocaGalleryText::wordDeleteWhole($value['caption'], 30, '');
$dataImg[$i]['description'] = $albumName . ' ' . ($value['name']=='' ? $noImageTitle : $value['caption']);
Waiting for alpha 3 to test.
But was going through the code. Most of it matched with mine except models > phocagalleryc.php
$dataImg[$i]['extid'] = $value['id'];
$dataImg[$i]['title'] = $value['name']=='' ? $noImageTitle : PhocaGalleryText::wordDeleteWhole($value['caption'], 30, '');
$dataImg[$i]['description'] = $albumName . ' ' . ($value['name']=='' ? $noImageTitle : $value['caption']);
-
- Phoca Member
- Posts: 24
- Joined: 15 Oct 2011, 16:03
Re: facebook login problem
Thank you Jan for your work. Very precious.
I also think that Google Plus Pages support would be very useful. Google is more reliable than Facebook :S
I also think that Google Plus Pages support would be very useful. Google is more reliable than Facebook :S