Page 5 of 7

Re: facebook login problem

Posted: 29 Dec 2012, 22:41
by honmore
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.

Re: facebook login problem

Posted: 30 Dec 2012, 13:00
by Jan
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

Re: facebook login problem

Posted: 30 Dec 2012, 13:47
by honmore
Yes, same issues that I encountered.
The workaround that I found for an expired token strangely is to close the browser window and relogin.

Re: facebook login problem

Posted: 30 Dec 2012, 15:22
by Jan
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

Re: facebook login problem

Posted: 30 Dec 2012, 15:40
by honmore
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.

Re: facebook login problem

Posted: 30 Dec 2012, 17:29
by Jan
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

Re: facebook login problem

Posted: 30 Dec 2012, 19:48
by Jan
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

Re: facebook login problem

Posted: 31 Dec 2012, 00:58
by Jakub
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á ;)

Re: facebook login problem

Posted: 31 Dec 2012, 01:01
by honmore
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']);

Re: facebook login problem

Posted: 31 Dec 2012, 12:46
by Mentos
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