Page not rebuilding/refreshing/or redirecting at/after login using Facebook Connect
Current login page doesn't rebuild/refresh/or redirect at/after login using Facebook Connect even though I have been logged in, so i.e. the login page, login link or as well user login block are still appearing but would only dissappear/change if I manually refresh the site page.
Why this issue? Have I missed to do something in the settings? Or do I have to add any Rules/or Action/or Trigger (Drupal core) to get this work?
Error message saying "An error has occured please try later" at login using Facebook Connect
Another issue related to the above is an annoying error message at login using Facebook Connect even though I have been logged in but page didn't rebuild/refresh/or redirect.
Maybe because of my Facebook extended permissions settings? Maybe I had better not to enable any of the checkboxes extended permissions settings?
Furthermore I receive error these messages: "Failed to query facebook user info: Invalid OAuth 2.0 Access Token 190. (logged into facebook as )"
Drupal for Facebook Devel giving me these message: "Invalid OAuth access token signature. Failed to get info for [facebook app name]" and "Failed to get app properties for [facebook app name].: Invalid OAuth 2.0 Access Token 190 Exception: 190: Invalid OAuth 2.0 Access Token"
Searching around for an answer I found various 'Drupal for Facebook' issues submitted by others among others:
fb_require_authorization function doesn't use Facebook API login url (6.x-3.0-rc8)
- Facebook has changed the URLs since fb_require_authorization() was first written. (---)
http://drupal.org/node/1083076
Need to pass token to FQL query in fb_users_getInfo (6.x-3.x-dev)
- Since I don't want to display those annoying xxx@facebook names, I'm calling fb_format_username() for the FB users to get their FB names and display that instead. This works for the current user but not for other users (---)
- It seems that the FQL query in fb_users_getInfo (fb.module line 1296, which is called by fb_format_username()) does not pass the needed authentication token.
I saw another issue regarding fb_permissions and so added "array('access_token' => fb_get_token($fb))" as the third argument to to fb_fql_query(). This resolved the issue and now any user can see the names of all other users. (---)- fb_users_getInfo() is deprecated. (---)
- A patch attached for 6.x-3.x-dev.
http://drupal.org/node/1066486
The patch for 6.x-3.x-dev mentioned above useful/needed for the latest updated 6.x-3.x-dev?
Comments
Comment #1
miccelito commentedadded new release of 6.x-3.x-dev of 11 March 2011
But still.. when login in via Facebook Connect button (by Drupal for Facebook) the page is not rebuilding/refreshing.. the user who logged in by Facebook Connect is logged in but since the page doesn't rebuild/refresh, the user will still see same (not changed) page showing login link and login block. User will think he/she is not logged in.
Besides that I received fb devel messages;
Failed to get app properties for xxx.: SSL read: error:00000000:lib(0):func(0):reason(0), errno 104 52
CurlException: 52: SSL read: error:00000000:lib(0):func(0):reason(0), errno 104
warning: fread() [function.fread]: SSL: Connection reset by peer in /home/xxx/public_html/the/includes/common.inc on line 552.
Failed to get app properties for xxx.: Invalid OAuth 2.0 Access Token 190
Exception: 190: Invalid OAuth 2.0 Access Token
*xxx means app name
Comment #2
Dave Cohen commentedMaybe #1085754: SSL certificate problem - SSL3_GET_SERVER_CERTIFICATE:certificate verify failed 60 will solve the curl exception.
Comment #3
miccelito commentedThank you for your reply. I haven't try yet to un-comment the two CURLOPT_SSL lines.
Howsoever, I did update my install of Drupal for Facebook 6.x-3.x-dev module with your latest 6.x-3.x-dev update (15 March 2011), as well I had another module Facebook Share which wasn't enabled though but I did uninstall and remome it totally. And I have tried again to login via Facebook Connect button and now the rebuilding/refreshing is working. But I can't say for sure what made it works. Either the update or the remove of the other module. Also, I have a multi-lingual site, and I saw you have added some new lines ("fb_i18n_0.diff") in the latest update.
But now there is another problem, as facebook user (fub) I can't logout from the site, it keeps me logged in even though I'm not logged in at facebook.com
Comment #4
Dave Cohen commentedWell I'll consider this fixed unless you say otherwise. I suspect the update to latest .dev release made the difference.
Comment #5
miccelito commentedThe issue I opened in this thread is fixed but instead I got the new problem that if I log in via Facebook Connect/as Facebook user I will not be able to log out from the site. It keeps me logged in no matter if I click Logout link hundred times even I'm not logged in on Facebook.com.
Should also say I have module Logintoboggan enabled on my site.
Had to manually clear cache and cookies in the browser to get logged out.
Comment #6
Dave Cohen commentedsubmit new issues for different problems. otherwise I can't manage this issue queue.
for that problem, disable logintoboggan to see if that's the cause (probably is) also use firebug or chrome's console to look for javascript errors. Javascript errors can prevent the logout from facebook.
Comment #7
miccelito commentedDisabling Logintoboggan didn't change anything or solve the logout issue. There are no javascript errors.
But after unchecked the 'Set FB Cookie' the logout is working fine now. Further more, I suspect that running multilingual sites makes Drupal for Facebook a bit more tricky when it comes to login and logout functionality (i.e. my frontpage url is a multilingual variable).
Ok, I will submit new issue regarding other questions related.
Comment #9
aks_richa commentedi have install latest version in my site. i am using 6.x version in drupal but if user login using facebook page is not reloaded and they are still on login page. but if you click on home page user is login.. i dnt know what's the problem as i have fie=rst time install this modules. please help. thanks in advanced.
Comment #10
aleada commentedI have the same problem as said aks_richa on post #9 .
I have created a page called register with url www.sitename.com/register containing the login block containing the fbconnect button. This page displayed on 403 pages (restricted access - login required ).
When a user is trying to access a protected url such as node/add/page a redirection to /register occured.
After that the user is able to login using the classic login using user name and password and if suceed a new redirection occured to the initial restricted url node/add/page for example.
In case that user connect using the fbconnect button no redirection to the initial page occured. The page is not refreshed and only if user visit the home page and the user continue as auth user.
Comment #11
Dave Cohen commentedamatech, don't comment to closed issues. Most of us will never see your post. I only saw this by chance.
Anyway I think the 403 pages is a separate issue. I just ran into it the other day and will have a fix checked in shortly. In the meantime search for 'site_403' in fb_user.module. Comment out the line where you see it. That should solve it for now.
Comment #12
vinoth.3v commentedI am makign this active. sorry. but I am using the latest dev version with latest FB SDK.
nothing happens after login.
Comment #13
vinoth.3v commentedDave,
Please make drupal 6 RC version available to project page.
Comment #14
aks_richa commentedhey vinoth.3, please check this link.
http://drupal.org/node/1308314
try to use 6.x-3.1 2011-Sep-21 version its stable version. i have used in my site and its working... and let me know if you find any other problem..
and also check that in your page.tpl file is thr print $closure; written in file.....
Comment #15
miccelito commented@aks_richa:
Ought to work as you say... 6.x-3.1 (2011-Sep-21) stable version together with new Facebook PHP SDK (2012-02-02 new update).
@Dave Cohen:
I had a look in the latest Facebook PHP SDK 3.1.1 (2012-02-02) base_facebook.php comparing it with its former version 3.1.1.
There are some changes. You might have a look and may have some viewpoints if you see anything that might be a reason for users having problem since Feb 2012 with the Facebook login (page /user/login is not refreshing or redirecting after login).
Facebook PHP sdk 3.1.1 (former) base_facebook.php - Line 313:
Facebook PHP sdk 3.1.1 (2012-02-02) base_facebook.php - Line 313:
Facebook PHP sdk 3.1.1 (former) base_facebook.php - Line 707:
Facebook PHP sdk 3.1.1 (2012-02-02) base_facebook.php - Line 706:
Facebook PHP sdk 3.1.1 (former) base_facebook.php - Line 964:
Facebook PHP sdk 3.1.1 (2012-02-02) base_facebook.php - Line 958:
Facebook PHP sdk 3.1.1 (former) base_facebook.php - Line 1087:
Facebook PHP sdk 3.1.1 (2012-02-02) base_facebook.php - Lines above have been removed