General plugins

Facebook Connect

 
This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.
Picture of Aaron Fulton
Facebook Connect
 
I've created a new module which provides Facebook integration with Moodle

This module uses Facebook connect to allow the following features:
* Users to add associate their Facebook account with their Moodle account
* Users to use their Facebook account to log into Moodle
* Teachers to add a Facebook Live Stream Box as an activity in a course

For the download package see http://moodle.org/mod/data/view.php?d=13&rid=3316

I'm sure there are many things that could be added to this module. I'm open to feature requests. If there is a feature you need, create an issue on the Moodle issue tracker against "Package: Facebook"
 
Average of ratings: Useful (3)
Picture of Claire Browne
Re: Facebook Connect
 
Hello.

Fantasic IDEA!

Cant wait for it to be approved. Anyway you could send it to me, so I can get it quicker?

In our organisation with have a face book page so we will be looking to live stream box on that straight through to our moodle users course pages.

Please keep in touch for further updates and I will let you know about more features needs through the tracker.
 
Average of ratings: -
Picture of John Andrewartha
Re: Facebook Connect
 
I am with Clare on this one. Are you working on a FarmVille interface? Say YES Please. tongueout
John
 
Average of ratings: -
Picture of Alex Lee
Re: Facebook Connect
 
Hi - it would be good to have this as soon as - this would be a really interesting plugin!
 
Average of ratings: -
Picture of Joseph Thibault
Re: Facebook Connect
Group Testers
this sounds very cool. Do you have it set up on a demo site so we can take a peak or even login with our FB accounts?
 
Average of ratings: -
Julian Ridden
Re: Facebook Connect
Group Core developersGroup Moodle Course Creator Certificate holdersGroup Plugin developersGroup Translators
I have installed it on the http://www.imoot.org website. Feel free to log in and try it out. Maybe even attend the iMoot if you wish smile

P.S. How about that for subtle marketing :D
 
Average of ratings: -
Picture of Alex Lee
Re: Facebook Connect
 
Hi Julian

I have set up an account now - are there any Facebook activities up iMoot that I can play with now to see how it works?

Alex
 
Average of ratings: -
Julian Ridden
Re: Facebook Connect
Group Core developersGroup Moodle Course Creator Certificate holdersGroup Plugin developersGroup Translators
On the information page I have setup a livestream box. Although there is not much to show in there yet.

http://imoot.org/course/view.php?id=2
 
Average of ratings: -
Picture of Claire Browne
Re: Facebook Connect
 
Hi Julian.. great live stream.

Have your tried the jisc emerge for the twitter feeds?

As I saw you only had a twitter link.
 
Average of ratings: -
Picture of Tobias Sopu
Re: Facebook Connect
 

What moodle version did you use? 

Which moodle package I should be installing inorder for facebook connect to work?

pls advice

 

 

 
Average of ratings: -
Picture of Roger Shindell
Re: Facebook Connect
 

As a "Newbe" I'm a little confused.  I registed at imoot, and logged in.  Don't see anything refering to Facebook.  Might you provide some additional instructions, so I can see the functionality?

 

Best wishes

Roger

 
Average of ratings: -
Picture of gaston perez
Re: Facebook Connect
 

hola tengo problemas para configurar mi dominio en Facebook developers - aplicaciones - "mi ap" - Basico

en la opcion que dice dominio de la aplicacion. ingreso el nombre de dominio. por ejemplio: http://onlinestudio.com.ar

y me dice que el dominio no es valido.

alguna sugerencia.???

 
Average of ratings: -
Picture of Tim F
Re: Facebook Connect in moodle 2.2
 

Was wondering if people were satisfied with the facebook connect plugin using moodle 2.2

Is it working properly?  Before I embark on the integration I just wanted to see if anyone was having good or bad experiences on 2.2 platforms.  Thanks!

 
Average of ratings: -
Picture of John Andrewartha
Re: Facebook Connect
 
This is one RIPPER of a plugin. Just one small question how do you incorporate the Facebook Connect into the Login Box on the front page?
BTW I had never been on Facebook until 4 days ago, now I have clean the fish tank till the land ++. I love my children.
John
 
Average of ratings: -
Picture of Aaron Fulton
Re: Facebook Connect
 
Thanks for setting up the demo Julian. I'm glad the plugin works well for you. Let me know of feature requests if you have them. I know there is much more this module can do with Facebook.
 
Average of ratings: -
Picture of Claire Browne
Re: Facebook Connect
 
Hi,

I have now successfully set up facebook connect.

Is there anyway of taking the friends link off the live box stream?

Just that our students login to their personal account and can reply to non work related people.

Other than a really great plugin
 
Average of ratings: -
Picture of John Andrewartha
Re: Facebook Connect
 
I agree Clair,
A brilliant plugin. I got the one here going over last weekend. It took another 2 days for me to build the fb application. In the end my 18 yo daughter nudged me out and fixed it.
If we are going to consider options can I suggest that the default is everything on and then turn off what we don't want.
Should we move the feature discussion to the K - 12 forum?
John
 
Average of ratings: -
Picture of Claire Browne
Re: Facebook Connect
 
Hi,

Yes that would be a good idea to having everything as default and then having bits to turn off when needed.

Could you end me the link to the k-12 forum, i have trouble navigating around moodle.org as it is.

 
Average of ratings: -
Picture of John Andrewartha
Re: Facebook Connect
 
Here it is Clair,
I have started a thread in the Moodle for K -12.
http://moodle.org/mod/forum/discuss.php?d=143119
John
 
Average of ratings: -
Picture of Aaron Fulton
Re: Facebook Connect
 
Hi Claire. No there is no way to take the friends link off the live stream box (see facebook documentation at http://wiki.developers.facebook.com/index.php/Fb:live-stream)
 
Average of ratings: -
Picture of Tobias Sopu
Re: Facebook Connect
 

Hi Aaron,

Thanks for the plugin, still trying to figure out how it could work with moodle 2.2 please help with this question, since fb-live stream was removed Oct 3, 2012 and use the comment box instead, which folder should be revised, 

mod subfolder of the facebook plugin. ? 

Please Advice. I really need your help.

 

cheers

 
Average of ratings: -
Matt Bury
Re: Facebook Connect
Group Particularly helpful MoodlersGroup Plugin developers

Facebook might be gonig the way of MySpace: http://www.guardian.co.uk/technology/2013/apr/28/facebook-loses-users-biggest-markets

Would it be a more forwardly compatible and flexible idea to allow users to authenticate and expose their data from whichever social networking platform they use? e.g. MySpace, Google+, Elgg, Facebook, Diaspora, Tuenti, Twitter, Edmodo, Meetup, LinkedIn, Livemocha, Babbel,...

 
Average of ratings: -
Picture of Tobias Sopu
Re: Facebook Connect
 

Thanks Matt,

By the way, I already understand your point. We already discussed it before. Now, if you couldn't help develop the plugin, then please don't reply. If you are an anti-social person, please leave this alone. 

This is about discovering new idea that might need for upgrade for moodle. We are trying to improve moodle here not facebook. And plus, this plugin is just for discussion only. And it cannot expose to anybody which I can asure you that...

cheers

 
Average of ratings: -
Picture of Joseph Thibault
Re: Facebook Connect
Group Testers
I might have missed this one the demo site, but I think it would be great to publish assignment submissions directly to a user's facebook page. (like, when they submit and to what assignment, not the actual submission, just like the teacher notification).
 
Average of ratings: -
Picture of Dave Arnold
Re: Facebook Connect
 

I've made a duplicate of the login block for v1.9 and added the facebook connect hooks to it. It works great.  I've attached it to this.  The block requires you to have Aaron's auth plugin working.  I was having the same issues on 1.9 several people mentioned.  The facebook session data is not readable to moodle so the server side api can't return even the fb userid.  I couldn't figure out how to make the session data play together so I did some hacking to get the fb userid and make linking accounts works.  

Aaron maybe you can include this in your download. facebooklogin just needs to be dropped into the blocks folder then click the notifications link. 

 
Average of ratings: -
Picture of Madhu Sudan
Re: Facebook Connect
 
Hi

Demo of the same can be seen at http://www.netversity.co.in

Thanks to Aaron for his help to get it implemented
 
Average of ratings: -
Picture of Shamim Joarder
Re: Facebook Connect
 
Hi,
I have installed the plugin successfully. Facebook authentication is working, but live stream is not working. Can u plz identify any reason. I followed the installation instruction as on the plugin page. Any help would be appreciated. Live stream box shows three vertical lines and seems to me that it is trying to download the stream from facebook. After some times it stops.

Thanks.

- Shamim
 
Average of ratings: -
Picture of Claire Browne
Re: Facebook Connect
 
Can I have your moodle url? can i see if i can log in?

do you have screen shots?

Also what browser are you using? I had problems with IE but google chrome and fire fox work.
 
Average of ratings: -
Picture of Shamim Joarder
Re: Facebook Connect
 
Hi,
Thanks for ur quick reply. Here is the url
http://www.transformingassessment.com/moodle/auth/facebook/login.php

Course where i have added the stream is Networking Essentials
http://www.transformingassessment.com/moodle/course/category.php?id=2

Thanks again.

- Shamim

 
Average of ratings: -
Picture of John Andrewartha
Re: Facebook Connect
 
I just had a run through your site and I looks and works just like mine. I use FF. Maybe chrome is being painful.
The only part I did not check was weather I could link the Moodle >> FB login.
I did notice that the FB icon was missing in Network Essentials. This appears to be a problem with some themes.
John
 
Average of ratings: -
Picture of Shamim Joarder
Re: Facebook Connect
 
Hi,

Thanks for ur reply. I managed to get it work. I replaced the code with iFrame.

<iframe src="http://www.facebook.com/widgets/livefeed.php?app_id=YOUR_APPLICATION_ID&width=400&height=500" width="400" height="500" marginwidth="0" scrolling="no" frameborder="0"></iframe>

Thanks.

- Shamim
 
Average of ratings: -
Picture of Shamim Joarder
Re: Facebook Connect
 
Hi John,

Just a quick question. Is this live feed displays 'Top News'. In my case it is showing only 'Top News'. Is there any wany that we can show 'Most Recent' news or 'Wall' contents.

Thanks.

- Shamim
 
Average of ratings: -
Picture of Alex Lee
Re: Facebook Connect
 
Hi Aaron

When I install this onto my Moodle server I get a message that the tables have been setup, then I get these errors... I have Moodle 1.9.7

Notice: Constant SERVICES_JSON_SLICE already defined in /srv/www/htdocs/lrtmoodle/lib/json/JSON.php on line 62

Notice: Constant SERVICES_JSON_IN_STR already defined in /srv/www/htdocs/lrtmoodle/lib/json/JSON.php on line 67

Notice: Constant SERVICES_JSON_IN_ARR already defined in /srv/www/htdocs/lrtmoodle/lib/json/JSON.php on line 72

Notice: Constant SERVICES_JSON_IN_OBJ already defined in /srv/www/htdocs/lrtmoodle/lib/json/JSON.php on line 77

Notice: Constant SERVICES_JSON_IN_CMT already defined in /srv/www/htdocs/lrtmoodle/lib/json/JSON.php on line 82

Notice: Constant SERVICES_JSON_LOOSE_TYPE already defined in /srv/www/htdocs/lrtmoodle/lib/json/JSON.php on line 87

Notice: Constant SERVICES_JSON_SUPPRESS_ERRORS already defined in /srv/www/htdocs/lrtmoodle/lib/json/JSON.php on line 92

Fatal error: Cannot redeclare class services_json in /srv/www/htdocs/lrtmoodle/lib/json/JSON.php on line 116

Any ideas?

Alex
 
Average of ratings: -
Picture of Aaron Fulton
Re: Facebook Connect
 
Is suspect that this error is because you are running some version of PHP 4 rather than PHP 5. I think the facebook module is adding in the JSON functionality which is missing from PHP 4. It looks like Moodle also makes this same correction which is why the error. I'm going to lodge this as a bug; test with PHP 4 and probably remove the JSON files from the next release. In the mean time, if you go into auth\facebook\facebook-platform\jsonwrapper\jsonwrapper.php and remove the line that starts "require...."it should come right.
 
Average of ratings: Useful (2)
Picture of Ermilo Dorantes
Re: Facebook Connect
 
Would you please check whats wrong with my site?

www.cetis112.edu.mx/aulavirtual


 
Average of ratings: -
Picture of Aaron Fulton
Re: Facebook Connect
 
You have not set your site up correctly on Facebook. Go to
http://www.facebook.com/developers then edit your application settings. In the "Connect URL" field enter "http://cetis112.edu.mx/aulavirtual" or "http://cetis112.edu.mx/aulavirtual/". One of those two should work.
 
Average of ratings: Useful (1)
Picture of Nicholas Harvey
Re: Facebook Connect
 

Thanks for the great app. I have had complaints that Firefox users can't login my site (http://www.memorablemedicine.com) at all now while IE deals with it fine. Any ideas?

Cheers!

 
Average of ratings: -
Picture of Aaron Fulton
Re: Facebook Connect
 
You don't quite have the <html> tag right in your theme. On your site it reads:
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en"><html xmlns:fb="http://www.facebook.com/2008/fbml">

It should read:
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en" xmlns:fb="http://www.facebook.com/2008/fbml">


 
Average of ratings: Useful (1)
Picture of Marcin Stanowski
Odp: Facebook Connect - guest account not working - errorcode=3
 
Hi there,

after migration to 1.97+, a theme change, and adding Facebook Connect suddenly studets-guests entering open courses like this one: http://poznajsiebie.org/czacki/moodle/course/view.php?id=60

see the log-in page and are required to log even if they did not have to do that before - the course is open to guests.

The URL address bar shows: http://poznajsiebie.org/czacki/moodle/auth/facebook/login.php?errorcode=3

I understand it is connected somehow with facebook Connect, as I ruled out the problems with the theme and update issues.

I switched off Facebook Connect authentication and still the guest account does not work.

Any hints?

Marcin Stanowski
 
Average of ratings: -
Picture of Aaron Fulton
Re: Odp: Facebook Connect - guest account not working - errorcode=3
 
I've trolled the code and found that errorcode=3 means "Invalid login". Why thats happening I'm not sure. Is your course available to guests? If you get nowhere send me a private message with an admin login an I will dig deeper.
 
Average of ratings: Useful (1)
Picture of Ernest Leong
https for logins with Facebook Connect
 

Originally, we have Use 'HTTPS for logins' turned on under the HTTP Security settings.  And user would login at a encrypted page at: https://ourmoodleserver/login/index.php

But after we installed the Facebook Connect module, the link for the the Login page still indicates https://ourmoodleserver/login/index.php, but in the end, the user seems to be redirected and lands on this page: http://ourmoodleserver/auth/facebook/login.php

How to make the redirected page use SSL?

Thanks,

Ernest

 
Average of ratings: -
Picture of Aaron Fulton
Re: https for logins with Facebook Connect
 
This sounds like a bug to me. I've added to the issue tracker so I remember to look at it an fix it.
 
Average of ratings: Useful (1)
Picture of Kenny Snider
Re: Facebook Connect
 
Hey I could need some help with the setup
  1. You will need to register your site with Facebook before you can use this module. Go to http://www.facebook.com/developers, add the application if you have not done so already, then create a new Facebook application. Each Connect website is treated as a Facebook application, and so it needs an API key.
    • Fill in these fields:
    • Application Name: this will be what your users will see when they connect to your site.
    • Terms of Service: Select Agree. The Developer Terms of Service govern among other things how you can use the information on your site. Pay particular attention to section G, Facebook Connect.
    • Connect URL: This is the root URL of your Moodle site.
    • Submit your application, and make note of your API key and Secret.
  2. Move the contents of the 'auth' directory to your Moodle 'auth' directory.
  3. Move the contents of the 'user' directory to your Moodle 'user' directory.
  4. Move the contents of the 'mod' directory to your Moodle 'mod' directory.
  5. Edit the header.html file in your themes directory and add facebook namespace to the HTML tag
  6. Go to your main Moodle admin page (Site Administration > Notifications)

  7. Go to (Modules > Activities > Manage Activities) and enable the 'Facebook Live Stream Box' by clicking on the 'eye' icon.
  8. Enter the Secret and API keys when prompted
  9. Go to (Modules > Activities > Manage Activities) and enable the 'Facebook Live Stream Box' by clicking on the 'eye' icon.

  10. Go to (Users > Accounts > User profile fields) and add a new 'Facebook' profile field.
  11. Give the profile field a Short name ("facebook" suggested), Name ("Facebook" suggested) and click 'Save Changes'
  12. Go to (Users > Authentication > Manage Authentication) and enable the 'Facebook' module by clicking on the 'eye' icon.

If I click on the eye nothings happens. It just close and open.. no promt for API key or Secret.
What should I do now? I coult edit the config files manual if I would know which one it is
 
Average of ratings: Useful (2)
Picture of John Andrewartha
Re: Facebook Connect
 
You have entered the API key and the secret key? No
In the Modules >> Activities select Facebook Connect from the list.
Enter the API Key and secret Key and save.

It should work now. Check by logging out go to the main login page. You should have a icon to allow connection through your FB account. Give it a run, you can link FB and Moodle accounts.

After you have it working there is a thread in the K-12 forum on FB.

John
 
Average of ratings: Useful (1)
Picture of dimas agung
Re: Facebook Connect
 
Have you tested this on chrome?

Mine is not working. It is only working on Internet explorer and Firefox

If I use chrome, it always redirect the address to http://student.ut.ac.id/auth/facebook/undefined


Need enlighten here.. thanks smile
 
Average of ratings: -
Picture of Kieran Bailey
Re: Facebook Connect
 
I am also having this exact same problem but in any browser. I have installed as per the instructions. I had some difficulty understanding the User Profile Field. What was exactly the process there?

it looks like a great package otherwise - i'd just love it to work smile
 
Average of ratings: -
Picture of Kieran Bailey
Re: Facebook Connect
 
Update! When it does work (seems flaky) I always have to re-link my accounts?
 
Average of ratings: -
Picture of John Andrewartha
Re: Facebook Connect
 
I think you will find that when you 'Connect using FB' all that happens is you login into FB without bringing up the first screen. When you use the FB app in a activity you are already authenticated.
From memory the link accounts stopped working a few weeks ago.

If you need a quick hint on how to use it. I put 2 frames in a webpage one has FB the other the lesson material. A nice video is good. Watch video and do live feedback using FB.

 
Average of ratings: Useful (1)
Picture of almush almush
Re: Facebook Connect
 

I didn't understand you, sorry.

I still experience the same problem when using Chrome.

Is there a fix to that ? if there is then what is it ?

Thanks

 
Average of ratings: -
Picture of Zach Black
Re: Facebook Connect
 

I've got the same problem when I click "Login with facebook account" http://nje7t.com/auth/facebook/undefined

 
Average of ratings: -
Picture of matt meisberger
Re: Facebook Connect
 
Is anyone seeing a problem with the XID not working? in the line of code in view.php where it sets up the live stream it uses an xid. If i change the xid="default" or delete it all together my live stream will work and display posts but if I leave it as I received it, it will only send responses to the user's facebook wall and the live stream box remains "no stories..." upon refresh. Maybe I have something wrong in my facebook application settings.
 
Average of ratings: -
Picture of Aaron Fulton
Re: Facebook Connect
 
Sounds like your settings are correct if you are posting messages at all. On the facebook stream box page, can you please do a view source and find the line "<fb:live-stream width="600" height="476" xid="xxxx"></fb:live-stream>" and tell me what xxxx is. My guess as to what is wrong is that there is something invalid in the xid field.
 
Average of ratings: Useful (1)
Picture of matt meisberger
Re: Facebook Connect
 
In the php it sets the XID dynamically and I modified the code to use static elements just to try to diagnose the problem. I manually changed the xid to "default2" and "fbook1" and all other manner of things that facebook documentation says comply with what an xid should be. If I manually set it to default it works fine but I would like more than one stream for the entire site so that each course can have its own face book stream. Everything seems to work fine. Strangely enough if I pass an xid which is valid then when I type something in the update box it will post it on the users wall but the box which displays the xid thread is blank whenever refreshed.
 
Average of ratings: -
Picture of William Tan
Re: Facebook Connect
 
I tried to login with FB on the "demo" sites shared on this thread.

Thought logging in with FB will also auto-create an account in Moodle and eliminate the need to create a new account in Moodle. Whereas, a new account still need to be created and then LINK it with FB login. Wonder if there is any way to bypass that and direct login to Moodle with Facebook (without creating an account in Moodle)?
 
Average of ratings: -
Picture of John Andrewartha
Re: Facebook Connect
 
You need a Moodle account to log into Moodle. The FB account just auto links both so you don't have to do it twice for FB.
Why would you want to do a auto create from FB to Moodle?
You would have every FB user able to a Moodle account. Just how many million users does FB have?
 
Average of ratings: -
Picture of Aaron Fulton
Re: Facebook Connect
 
In theory it is possible to create a Moodle account based on Facebook information and skip the register page, however the information accessible from Facebook is not complete. Facebook will not provide Moodle with an email address, or password. If data is pulled from Facebook, then there is a privacy policy to worry about. If a user unassociates their account from Facebook, then there would be all kinds of issues to contend with in terms of retaining infromation sourced from facebook. The easiest solution is to go with the status quo.

The only option I can think of that would help is to populate the Moodle register form with data from facebook, then allow the user to edit and fill in any missing information before creating the account. I suspect doing this would require a patch to moodle core.
 
Average of ratings: Useful (1)
Picture of Chetan Sharma
Re: Facebook Connect
 

HI Aaron, Please let me know that how can i make FB pic same as the Moodle profile Pic of the user logging in.

 
Average of ratings: -
Frankie's the name, Moodle's my game!
Re: Facebook Connect
Group Particularly helpful MoodlersGroup Plugin developers

Hi John! I've managed to link my Facebook account to a moodle account on my system. Unfortunately, I've linked it to the wrong Moodle account. So now I would like to UNLINK my FB account from the currently linked Moodle account. How do I do this? Anyone?

Frankie Kam, Melaka, Malaysia

 
Average of ratings: -
Picture of John Andrewartha
Re: Facebook Connect
 

Hi Frankie,

You will need to change the link in the FB aps to point to the correct url.

 
Average of ratings: -
Picture of Aaron Fulton
Re: Facebook Connect
 

If you edit your profile there should be a link under your facebook profile pic to unlink account.

 
Average of ratings: -
Picture of kazi chawky
Re: Facebook Connect
 
Hi,

Really a great plugin, congratulations !

However, I have a problem with the "Connect with Facebook", the text "You can use your Facebook account to log Into this site. If You Have a Facebook account and wish to login click it with the 'Connect with Facebook' button "appears with the exception of the button. Could you explain how to solve this problem ?
 
Average of ratings: -
Picture of Aaron Fulton
Re: Facebook Connect
 
Can you please send me a message with the URL of the site so I can check.
 
Average of ratings: -
Picture of kazi chawky
Re: Facebook Connect
 
Here's the link: http://cie-l.net/lms/auth/facebook/login.php

I don't understand ! The button appears in a random manner in Firefox but not in Chrome or Safari !
However, no problem with Safari
Iphone .
 
Average of ratings: -
Picture of Allen Starowsky
Re: Facebook Connect - a bug?
 

Hello,

I installed the Facebook plug-in in my Moodle. It works great. I have one question:

When I enter: Users / Permissions / Define Roles // and then, for example: Student (or the other roles), in the field "Facebook Live Stream Box", under this, I see:

Square Bracket Square Bracket facebook:write Square Bracket Square Bracket

I'd like to know what to do in order to get rid of the 'Square Bracket Square Bracket' signs. I guess it's a kind of a bug. In the remaining fields, there are no such signs, for example: Forum Add news.

See the attached file - screen shot. What do do to get the right option? Thanks in advance for your response.


 
Average of ratings: -
Picture of Aaron Fulton
Re: Facebook Connect - a bug?
 
That is a bug. Basically there is not entry in the lang/en file for the phrase "write" within the facebook module. I've added this bug to the tracker to remind me to fix it.
 
Average of ratings: -
Picture of Kent Calero
Re: Facebook Connect - a bug?
 
Aaron, how up to date is the installation README.txt in the package?
 
Average of ratings: -
Picture of tran thanh hoa
Re: Facebook Connect - a bug?
 

I want after clicking the answers present frame facebook comment, I have to put it on?Thank

 
Average of ratings: -
Picture of Juanma Campos
Re: Facebook Connect
 
hello ther. I'm trying to install the module but I'm not able to configure the application I have just created:

I don't know how to fill the information I attach




 
Average of ratings: -
Picture of Alan Ng
Re: Facebook Connect
 

Like John A. asked previously on Feb. 1 2010, I'm also wondering how to make the front-page login form show the FB login option. Other than that, I've got everything else regarding FB Connect working correctly in our Moodle.

Symptom: We only get offered the FB login options when the user clicks the little "(Login)" link at the top right corner of the screen. The login screen on the front page did not change, still only asks for username/password.

We are using the "standardlogo" theme. Our URL is http://courses.dcs.wisc.edu/moodle/

 
Average of ratings: -
Picture of Dave Dannenberg
Re: Facebook Connect
Group Moodle Course Creator Certificate holders

Alan,

Did you ever figure this out? I would be interested in seeing the facebook login in the login blaock as well.

Dave

 

 
Average of ratings: -
Picture of Alex Contis
Re: Facebook Connect
Group Plugin developersGroup Translators

Hi,

How's this supposed to work? Can one log on with it's Facebook account and at the same time the Moodle account get's created?

Or are you supposed to have some method for self registration, like email-based self-registration??

Linking your Facebook account to an existing Moodle account seems possible but that means that the Moodle account must be created in a separate process.

Regards
Alex Contis
NetSapiensis AB

 
Average of ratings: -
Picture of Robert Klein
Re: Facebook Connect ...Namespace
 

Hi,

I am having a little trouble setting this all up. I am a little new.

It says you should edit the header to say

<html xmlns:fb="http://www.facebook.com/2008/fbml">

does this mean this is exactly what is written, or that the highlights portion is to be changed? What exactly is my facebook namespace?

I did set up an app I think, but it is a little new to me. Thanks in advnce.

Bob

 
Average of ratings: -
Picture of Robert Klein
Re: Facebook Connect ...Namespace
 

I have moodle hosted at godaddy version 1.9.

My website is www.mysciclass.com and I basically messed something up with the header and cant figure out how to at least get it back to normal. I am not a programmer, but did edit the header.html  in the theme, but all that shows up is what I actually wrote. Then the link to facebook is not even good. I did enter the facebook app info.

Maybe someone can help me figure out how to get it back to normal, before I try to set up a facebook connect again. much obliged.

Bob Klein

 
Average of ratings: -
Picture of Klaus Hammermüller
Re: Facebook Connect
 

Hi, this module is great, and I'd really love to use it.

unfortunately I have the same problem as some others, when clicking the connect with facebook button, I get http://lms.workademy.net/auth/facebook/undefined

I'd like to kill this bug, any suggestions where to look? In FB? PHP? DB?

Thanks a lot!

 
Average of ratings: -
Picture of Clarence Prudhoe
Re: Facebook Connect
 

Does Facebook Connect work in Moodle 2.0 ?

Thanks,

Clarence

 
Average of ratings: -
Picture of Pinal Bhatt
Re: Facebook Connect
 

Me too looking for Facebook connect with Moodle 2.0. Any body any ideas?

Thanks in advance.

- Pinal Bhatt

 
Average of ratings: -
Picture of Pinal Bhatt
Re: Facebook Connect
 

I tried to implement this module on Moodle 2.0, but no success. I am getting following exception:

Invalid get_string() identifier: 'pluginname' or component 'auth_facebook'

  • line 6050 of /lib/moodlelib.php: call to debugging()
  • line 6605 of /lib/moodlelib.php: call to core_string_manager->get_string()
  • line 75 of /admin/settings/plugins.php: call to get_string()
  • line 5564 of /lib/adminlib.php: call to require()
  • line 2670 of /lib/navigationlib.php: call to admin_get_root()
  • line 2580 of /lib/navigationlib.php: call to settings_navigation->load_administration_settings()
  • line 583 of /lib/pagelib.php: call to settings_navigation->initialise()
  • line 599 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav()
  • line 134 of /blocks/settings/block_settings.php: call to moodle_page->__get()
  • line 279 of /blocks/moodleblock.class.php: call to block_settings->get_content()
  • line 232 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
  • line 882 of /lib/blocklib.php: call to block_base->get_content_for_output()
  • line 934 of /lib/blocklib.php: call to block_manager->create_block_contents()
  • line 342 of /lib/blocklib.php: call to block_manager->ensure_content_created()
  • line 6 of /theme/simplespace/layout/general.php: call to block_manager->region_has_content()
  • line 627 of /lib/outputrenderers.php: call to include()
  • line 585 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
  • line 2086 of /lib/outputrenderers.php: call to core_renderer->header()
  • line ? of unknownfile: call to core_renderer->fatal_error()
  • line 1200 of /lib/setuplib.php: call to call_user_func_array()
  • line ? of unknownfile: call to bootstrap_renderer->__call()
  • line 320 of /lib/setuplib.php: call to bootstrap_renderer->fatal_error()
  • line 933 of /lib/upgradelib.php: call to default_exception_handler()
  • line 1355 of /lib/upgradelib.php: call to upgrade_handle_exception()
  • line 290 of /admin/index.php: call to upgrade_noncore()

 

Plugin "mod_facebook" is defective or outdated, can not continue, sorry.

More information about this error

Debug info: Plugin is not compatible with Moodle 2.x or later.
Stack trace:
  • line 425 of /lib/upgradelib.php: plugin_defective_exception thrown
  • line 265 of /lib/upgradelib.php: call to upgrade_plugins_modules()
  • line 1352 of /lib/upgradelib.php: call to upgrade_plugins()
  • line 290 of /admin/index.php: call to upgrade_noncore()

 

 
Average of ratings: -
Picture of Rebecca Thompson
Re: Facebook Connect
 

I have the same issue!! UGH!

 
Average of ratings: -
Picture of Daemon Knight
Re: Facebook Connect
 

Good Luck getting an answer. I think this one's been abandoned. I also tried another module, but it did the same thing to me. Never getting an update to the "Notfication" area.

 
Average of ratings: -
Picture of John Andrewartha
Re: Facebook Connect
 

It's useful to know which version of Moodle you are trying to install to.

From what I can see Facebook (connect)  is only for Moodle 1.9.*  not Moodle 2.* .

Modules for Moodle 1.9* will not work with Moodle 2.*.

Aron who is the developer is also a teacher in South Australia, he is just starting the new school year.   Time will not be his friend for a little while.

 

 
Average of ratings: -
Picture of Aaron Fulton
Re: Facebook Connect
 

There is a version for Moodle 2.0 in the pipeline, it is however not in a useable state yet.

 
Average of ratings: -
Picture of Carlos Lopez
Re: Facebook Connect
 

How can I uninstall the plugin until the moodle 2.0 version be ready?

 
Average of ratings: -
Picture of Aaron Fulton
Re: Facebook Connect
 

You should be able to just delete the Facebook module files and Moodle should work fine until the Moodle 2.0 version is ready.

 
Average of ratings: -
Picture of Carlos Lopez
Re: Facebook Connect
 

Also I find that I have to delete in the extra fields that I added in this part because before I delete that, moodle didnt let me go to the end of the upgrade

11.  Go to (Users > Accounts > User profile fields) and add a new 'Facebook' profile field.

12. Give the profile field a Short name ("facebook" suggested), Name ("Facebook" suggested) and click 'Save Changes'

 
Average of ratings: -
Anthony Borrow
Re: Facebook Connect
Group Core developersGroup Moodle HQGroup Plugin developersGroup Plugins guardiansGroup Testers

Almost all CONTRIB code written to work with Moodle 1.9 (and prior) will have to be updated to work with Moodle 2.0. Under the hood, there have been many changes that were necessary to help facilitate good development in core. Folks may be interested in CONTRIB-1988 which is the meta-issue to track some of those upgrades and also Development:Migrating_contrib_code_to_2.0 for information about what changes will need to be made. Peace - Anthony

 
Average of ratings: Useful (1)
Picture of Leandro Prudente
Re: Facebook Connect
 

Solution:
On auth/facebook/login_form.html at bottom:

<?php echo facebook_javascript(); //add javascript to the page and initialize with api key ?>
<script type="text/javascript">
FB.Connect.ifUserConnected(update_facebook_login);  
var fb_login_home = '<?php print $CFG->wwwroot .'/login/index.php' ?>';
</script>

Put this:

<script type="text/javascript">
var fb_login_home = '<?php print $CFG->wwwroot .'/login/index.php' ?>';
</script>
<?php echo facebook_javascript(); //add javascript to the page and initialize with api key ?>
<script type="text/javascript">
FB.Connect.ifUserConnected(update_facebook_login);
</script>
 
Average of ratings: Useful (1)
Picture of Lisandro Laura
Re: Facebook Connect
 

Leandro Prudente code did work for me with Crome... cool

Thank you!

 
Average of ratings: -
Picture of Fazil Mammadov
Re: Facebook Connect
 

İt works tnx smile

 
Average of ratings: -
Picture of Gavin McCullagh
Re: Facebook Connect
 

It appears that this bug affects Firefox 4 (on Windows) and Chromium (on Linux).  I'm seeing it now with the very latest versions of both moodle 1.9.11 and the plugin downloaded today.  It doesn't affect Firefox v3.6 on Linux.

If I had to guess, I'd say the URL is being generated automatically and some variable is evaluating to "undefined" instead of "login.php" or some such.  It seems likely this is the javascript call to update_facebook_login().  I'm not all that expert in JS debugging so I'm not sure what the root cause is.

When I load this up in chromium and open the javascript console, I get the attached screenshot.  I then get the second screenshot attached on the following page.

I can help test this out if need be.  See screenshots attached.  You can get me at gavin dot mccullagh at gcd dot ie if you need more info.

Gavin

 

 

 

 
Average of ratings: -
Picture of Aaron Fulton
Re: Facebook Connect
 

Thnaks for the screenshot Gavin. People have reported this problem before but I didn't have much to go in to fix the problem. The screenshot helped.

I think I've found the problem. Basically the "ifuserconnected" part of the Facebook API is called before the Facebook API is loaded fully. This appears to be a problem only in browsers that are fast at processing JavaScript. After a bit of googleing this morning I think I may have a solution.

At the bottom of /auth/facebook/login.html there is a line

FB.Connect.ifUserConnected(update_facebook_login);

try and replace it with

FB.ensureInit( function(){ FB.Connect.ifUserConnected(update_facebook_login);});

I don't have my dev site running at the moment to test this, but if it works let me know and I'll commit the fix to the project.

 
Average of ratings: -
Picture of Johann Ramos
Re: Facebook Connect
 

I took the liberty to translate this module to spanish, so if anyone needs it, message me, and i'll be happy to send the file.
I hope this would not be a problem to the developer/owner.

Me tomé la libertad de traducir este modulo al español, así que si alguien lo necesita puede mandarme un mensaje y envío la traducción.
Espero que esto no sea un problema para el desarrollador/propietario.

 
Average of ratings: -
Anthony Borrow
Re: Facebook Connect
Group Core developersGroup Moodle HQGroup Plugin developersGroup Plugins guardiansGroup Testers

Johann - Thanks for sharing the translation of the module. This is the spirit of Free and Open Source Software where each person does what he or she can to make things better. (Gracias por compartir la traduccion del modulo. Este es el espiritu de codigo abierto cuando cada persona pone de su parte para mejorarlo.). Peace - Anthony

p.s. - Feel free to contact Aaron Fulton and give him a copy of the translation. This can be done by creating an issue in the the Moodle Tracker (use the CONTRIB project and choose the component: Package: Facebook so the issue gets assigned directly to Aaron). Thanks for being a contributing part of the community. You can see other open issues for the Facebook package at http://tracker.moodle.org/browse/CONTRIB/component/10597

 
Average of ratings: -
Picture of Daemon Knight
Re: Facebook Connect Blank Notification Page
 

I followed all of the instructions. When I log into my site and click on the "Notifications" in the admin section....i just get a blank page.

 
Average of ratings: -
Picture of Abhi Sen
Re: Facebook Connect Blank Notification Page
 

Hi All,

I am using Moodle 1.9.9. I am getting the facebook connect button and on clicking I am getting logged on with the facebook ID but I can not see the 'Login with facebook account' after i created the moodle account too.

I an also getting Facebook not enabled error and

Stack trace:
  • line 1664 of lib/deprecatedlib.php: call to debugging()
  • line 33 of auth/facebook/login.php: call to error()
 
Average of ratings: -
Picture of pankaj khurana
Re: Facebook Connect
 

Hi,

First of all thank you for a such a useful plugin. I have followed all the instructions as told in the documentation.

Right now following things are happening

1)  Login page now contains login with facebook connect button (now url is auth/facebook/login.php)

 

2)  After authentication it comes  to auth/facebook/login.php page with user pic & name along with Login with facebook connect button

 

3) After clicking on Login with facebook connect button i am redirected to the page auth/facebook/link_account.php

It displays following inforamtion:

Before you can continue, you will need to either verify that you have an existing account on this site, or create a new account. Once you have done this, you will be able to log in with your Facebook account in the furture. If you have an existing login, please enter it now.

I am confused about what is the next thing after step 3?

Whether i have to create an account also inspite of login with facebook account incase of  new user (not created via moodle)? But issue will be that i have disabled self-registration under manage authentication settings.

Right now clicking on create new account displays following message.

Sorry, you may not use this page.

Or Other way is to link an existing account with the facebook login?

Please help me on this.

 

Thanks

Pankaj

 
Average of ratings: Useful (2)
Picture of Aaron Fulton
Re: Facebook Connect
 

Hi Pankaj,

The facebook padkage creates a linkage between Moodle and Facebook. The user will need an account on both systems.

It is the intention of this module that self-registration is enabled.

If the user already has an account, they may link it using the form in the screenshot you posted. The account can also be linked on the user profile edit page.

 
Average of ratings: -
Picture of panagiotis karageorgos
Re: Facebook Connect
 

Hi Aaron, this is a great mod you have. Thanks for sharing.

 All seems to be ok with my settings, although i want to ask you, why my facebook login doesnt login in me in my course? 

Is it true that to login in my moodle course i must have a moodle account also?

Here s my link http://www.mylesson.info/lesson/server/moodle/auth/facebook/login.php

(in greek)

Thank you 

 
Average of ratings: -
Picture of Aaron Fulton
Re: Facebook Connect
 

Yes, you will need a moodle account also. Moodle needs to keep its own records of what you do on the site (course enrolments, grades etc) the Facebook plugin allows you to link your moodle site login with your facebook login.

 
Average of ratings: -
Picture of Tobias Sopu
Re: Facebook Connect
 

HI Panagiotis,

I took a look into you site, which I'm still trying to fix mine. I took a screen shot of your login front page as shows below, I hope you don't mine. It seems like the "Connect with Facebook" button is not showing. Do you have any idea? 

Please Advice, or anybody else might know......

 
Average of ratings: -
Picture of panagiotis karageorgos
Re: Facebook Connect
 

Thank you for the reply. I m trying to use also some other apps from facebook into Moodle, and as i can see i may build an app in Fb and share all social plugins into moodle.

Any idea in how this module of yours can help me with that?

Thank you again

 
Average of ratings: -
Picture of Aaron Fulton
Re: Facebook Connect
 

Normally facebook apps are written in a third party site and hosted (via an iframe or FBML) into Facebook. I can't really help you with what you are trying to do. All I can suggest is that you take a look at the facebook developer documentation at http://developers.facebook.com/docs/

 
Average of ratings: -
Picture of pankaj khurana
Re: Facebook Connect
 

Thanks  Aaron for clearing my doubts.

 
Average of ratings: -
Picture of Rick Houghton
Re: Facebook Connect
 

Everything works well except the live stream activity box shows nothing.  How do you set that up?

 
Average of ratings: -
Picture of Tyrone Davies
Re: Facebook Connect
 

Is it possible to get an ETA for a version of Facebook Connect for Moodle 2? I am waiting on it before I launch my site

 
Average of ratings: -
Picture of Neelu Singh
Re: Facebook Connect
 

Hi,

I've use facebook package for Facebook integration with Moodle.I can login in moodle site by facebook Id but facebook Live Stream Box activity doesn't

work for me ,by adding this activity my facebook wall is not updated .

It might be possible i m doing anything worng ,so please guide me to use facebook Live Stream Box activity.

Further I have another requirment ,could it possible to send student progress asa notification in student facebook wall .

Please help me out!!!!

Thank you

 
Average of ratings: -
Picture of Damian Rivlin
Re: Facebook Connect
 

Great tool, however couldn't get it to work. Followed instructions exactly.


I've got a test server here: http://hazoolms.com/

User authenticates fine against facebook but isn't logged into the site. Not sure what I've done wrong. I had to fiddle with the header a bit and so may have done something wrong there.

Thanks in advance to any feedback anyone might have on this.

 
Average of ratings: -
Picture of Aaron Fulton
Re: Facebook Connect
 

Check the end of the <html ...> tag. I think there is a stray question mark there.  Not sure if thats enough to make the site fail, but it may be.

 
Average of ratings: -
Picture of Damian Rivlin
Re: Facebook Connect
 

Thanks for the tip Aaron - took it out, but no joy.

When I try to edit or check the (authentication/facebook login) facebook login I get the following screen - with no info about APP id etc.

screenshot of facebook login page

When I try to edit I get the following screen - stating the 'auth' value is missing.

(Not sure if  relevent.)

OR

Should the site policies URL be set? - this is not something I've done yet. I'm wondering if facebook is allowing to authticate but not the site because I've not done these yet.

Anyone else had the same problems?

 
Average of ratings: -
Picture of Dave Dannenberg
Re: Facebook Connect suddenly stopped working
Group Moodle Course Creator Certificate holders

I had this working in 1.9.11 and then it suddenly stopped. Now, after logging into their Facebook accounts, when folks try to login to my site, the following error is given:

I haven't made any site changes, or upgrades, to cause this problem so I have no idea what could have caused it.

Please Help!

 
Average of ratings: -
ME
Re: Facebook Connect suddenly stopped working
 

Dear Dave

I also got troubled. I used this code.

At the bottom of /auth/facebook/login_form.html there is a line FB.Connect.ifUserConnected(update_facebook_login);

Replace it with

FB.ensureInit( function(){ FB.Connect.ifUserConnected(update_facebook_login);});

 
Average of ratings: -
Picture of Susan Mangan
Re: Facebook Connect suddenly stopped working
 

I'm not sure if my issue is related to the issue above or not but thought I'd post just in case anyone has any ideas..??

had this installed fine on 1.9.8 on our development server and I'm am in the process of upgrading to 1.9.12.  After tarring the new moodle files for 1.9.12 I was unable login to moodle to trigger the admin database updates.  I get the WSOD (white screen of death).

When I enable debugging in the config file I get:

<b>Warning</b>: require_once(/opt/moodle/user/profile/field/facebook/field.class.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in <b>/opt/moodle/user/profile/lib.php</b> on line <b>469</b><br />

<b>Fatal error</b>:  require_once() [<a href='function.require'>function.require</a>]: Failed opening required '/opt/moodle/user/profile/field/facebook/field.class.php' (include_path='/opt/moodle/lib/pear:.:/usr/share/pear:/usr/share/php') in <b>/opt/moodle/user/profile/lib.php</b> on line <b>469</b><br /

Even more ODD is when I revert back to my backup moodle install, I get the same WSOD and errors! mixed
 
Average of ratings: -
Picture of Susan Mangan
Re: Facebook Connect suddenly stopped working
 

..further to my note above, I was able to restore back to my prev. version and access the site again. (1.9.8)

I uninstalled the f/b connect and then tried to do the upgrade to 1.9.12 again.

Same error.

...less than 30 mins later: I actually finally got the 1.9.12 install to run but for the life of me I can't figure out how I did it.

 
Average of ratings: -
Picture of Aaron Fulton
Re: Facebook Connect
 

Just to let you know that a new version for moodle 1.9 has been released that uses the new Facebook API. This fixes a number of issues that were present with the previous version and is also more secure.

 
Average of ratings: -
Picture of nikollas asto
Re: Facebook Connect
 

I have a problem using facebook connect. I have installed everything as the readme files explains. It looks to work perfectly but it doesn't save the link between local accounts and the facebook accounts. So every time it promts me to link the facebook account with the local one. What can I do to solve this problem?

 
Average of ratings: -
Picture of Tana O
Re: Facebook Connect
 

Hi,

First of all, good job Aaron for developing  such module.

Secondlly, I would like to ask when will the new version for Module  2.0 will be ready??

Regards,

 
Average of ratings: -
Picture of German Acevedo
Re: Facebook Connect
 
I have uploaded the files as directed, added the html tag to my header.html of my theme, but when I click Notifications, nothing happens, only a white page! What may be wrong? If I delete all the Facebook files, everything works fine. Thanks for your assistance, German
 
Average of ratings: -
Picture of Aaron Fulton
Re: Facebook Connect
 

Which version of Moodle are you running? Currently only moodle 1.9 is supported (2.0 will be soon)

 
Average of ratings: -
Picture of German Acevedo
Re: Facebook Connect
 
I´m using Moodle 1.9.12
 
Average of ratings: -
Picture of Toyoki Hashimoto
Re: Facebook Connect
 

Hello,

This topic, me too.

This problem is just  My Moodle Site trouble.

I'm using Moodle 1.9.9.

(I can write English very little sorry...)

 

Thank you.

 
Average of ratings: -
Picture of Rachel Kristiansen
Re: Facebook Connect
 

Do you know when support for 2.0 will be available?

 
Average of ratings: -
Picture of uriel flores
Re: Facebook Connect
 
Is it possible connect facebook with moodle 2???? and how??? I tried but moodle shows this error Lo sentimos, el plugin "mod_facebook" es defectuoso o no actualizado: no se puede continuar. Más información sobre este error Debug info: Plugin is not compatible with Moodle 2.x or later. Stack trace: line 456 of /lib/upgradelib.php: plugin_defective_exception thrown line 265 of /lib/upgradelib.php: call to upgrade_plugins_modules() line 1425 of /lib/upgradelib.php: call to upgrade_plugins() line 311 of /admin/index.php: call to upgrade_noncore() and I tried on moodle 1.9 and it works, but saddly Its necessary on moodle 2.0
 
Average of ratings: -
Picture of Pinoy Oragon
Re: Facebook Connect
 

After following the instructions, the "link account" page keeps on showing and would not allow me to enter the site. What seems to be the problem?

 

site url: http://moodle.adnuengineering.net

 
Average of ratings: -
Picture of Michael Greek
Re: Facebook Connect
 

Greetings everybody... Same situation here site is elearning.cs.unipi.gr/moodle btw app has been approved.

 
Average of ratings: -
Picture of Syed Mohiuddin
Re: Facebook Connect
 

Hi,

Excellent Module - Thanks

I've installed this and the connectivity works fine. The problem is:

No matter who logs in, it opens the administrative account of moodle. Not sure where and what wrong I am doing. Looks its a minor problem. But some help will be appreciated.

Ta

 
Average of ratings: -
Picture of Prashant Rais
Re: Facebook Connect
 

Exact same thing is happening to my site. I had to disable the FB Connect?

Why is thi shappening?

Can this be fixed.?

 
Average of ratings: -
Picture of Corey Dodge
Re: Facebook Connect
 

Hey Aaron,

I think this is a very great plugin, but I have a slight problem. I have installed everything correctly, however it does not seem moodle is saving the facbook login information. I have set up a user field and everything for facebook as well.

I can login and attempt to link my moodle to facebook accounts, but after the fact nothing takes place. I even set up profile pictures to be replaced, however all I ever see is the facbook account under "edit profile" where it just shows that I am connected to facebook.

Thank you for any input!

 
Average of ratings: -
Picture of Aaron Fulton
Re: Facebook Connect
 

Please ensure that you have the latest version installed. Due to a recent change made by Facebook the module needed to be upgraded and I fixed this bug the other day.

 
Average of ratings: -
Picture of Corey Dodge
Re: Facebook Connect
 

Thanks Aaron this did work for connecting both accounts, however not for replacing profiles pics ect. dunno why. But it's not a huge problem all I really wanted was the actually linkage.

 

Thanks!

 
Average of ratings: -
Picture of Marcin Stanowski
Odp: Re: Facebook Connect
 

Hi, Having used FB connect for a year I stumbled  upon some issues described here above.

I reinstalled the module with the freshest version and changed the weblib thing as well and since then whenever I am not connected to facebook and want to log in with FB connect clicking "Log In with facebook" brings no result - no reaction at all. Then when I am logged into facebook and want to log in to my moodle (http://www.czacki.moodle.waw.pl) when  I click the fb button  my FB account is recognised but I am asked to connect my moodle and facebook accounts each time.

Is there any hope for the module to get working?

Regards,

Marcin Stanowski

 
Average of ratings: -
Picture of Antonio Dégas
Re: Facebook Connect
 

I did everyhting as indicated, but when i try to Manage Activities, Facebook option do not appear to be enable even though the files are as indicated in the "Mod" folder. The remaining steps are ok.  What shold i do? What can be wrong? Thanks for  the help.

 
Average of ratings: -
Picture of Brigitte Baquero
Re: Facebook Connect
Group Moodle Course Creator Certificate holders

The package is not available any more? someone could upload it? or when it will be available again?

 

Really appreciated

 
Average of ratings: -
Picture of Cristian Gutiérrez
Re: Facebook Connect
 

HI:

I have a problem when I try to login with my facebook account to moodle, this happens to me:2

1

 
Average of ratings: -
Picture of Cristian Gutiérrez
Re: Facebook Connect
 

Hola a todos:

Pude solucionar el problema anterior, pero ahora tengo un nuevo inconeveniente. Al momento de querer ingresar con mi cuenta facebook a moodle, lo hace con mi cuenta de moodle. ¿Cual sería el error?  

HI:

I could solve the above problem, but now I have a new inconeveniente. At the time of wanting to join my facebook account to moodle, it's with my moodle account. What would be the error?

Login with Facebook:

4
But Moodle login to my account:

5

Bye

 
Average of ratings: -
Picture of David Martinez
Re: Facebook Connect
 

Hello I'm trying to put on work a moodle 2.1 with facebook_connect.

I have dowloaded de package, installed, followed the instructions, and no errors.

When I try to login, it shows me the button to log within facebook, but when I put my facebook id and password, there must appear the link account (link_account.php) but it appears white, no html inside.

I try to parse errors in php (putting echo "hello 1", "hello 2", etc..)

And it show "hello 1" but not "hello 2"

And the code is:

echo "hello 1"; 
require($CFG->dirroot.'/config.php'); 
echo "hello 2"; 
require($CFG->dirroot.'/auth/facebook/lib.php');

It seems that it's not founding dirroot in $CFG. (I'm new to moodle, php, and facebook, jejeje)

How can I solve this problem?

Sorry for my english.
 
Average of ratings: -
Picture of Gaurav Khambhala
Re: Facebook Connect
 

Replace 

require($CFG->dirroot.'/config.php');

With

require('../../config.php');

Things will work.

After doing this i could be able to view connect with facebook page. Entering moodle credentials leads me to blank page.

Aron,

Any quick soultion for this. 

 
Average of ratings: -
Picture of David Martinez
Re: Facebook Connect
 

Hi Gaurav, I'm still working on it, but I've done more changes than this to make facebook-connect module work on moodle 2.1

I've changed this files:

facebook_package.zip/auth/facebook/
     auth.php
     deauthorize_callback.php
     facebook_disconnect.php
     link_account.php

facebook_package.zip/mod/facebook/
     lib.php
     mod_form.php

facebook_package.zip/README.txt

Every changes are forced by changes in the moodle 2.1 API changes.

I'm new to moodle and to php.

I can't make the wall stream work with this module, can you help me?

If you want I can send you my modified zip file that makes login with facebook work with moodle 2.1 version.

Best regards,

David.

 
Average of ratings: -
Picture of Gaurav Khambhala
Re: Facebook Connect
 

Hey David,

Yes, I would love to help to make stream module work. I have developed 1.9 activity modules. There are list of changes to be done while in 2.1 activity modules.

I have seen the code it still uses 1.9 api function names. Would start on it soon and share details if any.

Regards,
Gaurav Khambhala

 
Average of ratings: -
Picture of Tobias Sopu
Re: Facebook Connect
 

Hi David and Gaurav,

Did you guys get to make the necessary changes....? please let me know if possible.

 

Thanks in advance

 
Average of ratings: -
Picture of stuti bhavsar
Re: Facebook Connect
 

I am using moodle 2.2 and I want to integrate facebook in it so that user can login through their facebook account.

Can you please instruct me how to implement facebook connect in my site?

 
Average of ratings: -
Picture of Gaurav Khambhala
Re: Facebook Connect
 

You will have click on Login with facebook account page. It will lead you to http://yourmoodlehost/auth/facebook/link_account.php 

on this page you will have to enter moodle user credential to connect to facebook account. 

 
Average of ratings: -
Picture of Fernando Oliveira
Re: Facebook Connect -
Group Plugin developers

Hi Aaron and all,

I've had this mod running on one of our sites for a couple months and all seemed well until I realized that someone else was logged in as me!  It seems that when that user clicked on the "login with facebook account" link, the server used MY facebook credentials. This user was another city altogether. Is it possible that the server is caching my facebook login details? I assume I was the last person to login.

Any suggestions would be appreciated.

Thanks,

Fernando

 
Average of ratings: -
Picture of Martin Fér
Re: Facebook Connect -
 

The same problem. (I think that it didnt happen before, but i am not sure).

 
Average of ratings: -
Picture of weahason weahama
ตอบ: Facebook Connect
 

I can not do it yet.

Can you made manaul to be sceenshot step by step?

 
Average of ratings: -
Picture of Gaurav Khambhala
Re: ตอบ: Facebook Connect
 

Everything seems fine from installation to configuration. When I click Connect button on facebook connect page it redirects me to the login/index.php with blank data. 

Aron, any idea that I could fix this? Is it sending proper form parameters to login/index.php file? 

 
Average of ratings: -
Picture of David Martinez
Re: ตอบ: Facebook Connect
 

As I've said you in other post, I can send you my update to facebook_package.zip that works with moodle 2.1 (only association and login with facebook account), I still need help with wall stream update.

Regards,

David.

 
Average of ratings: -
Picture of Gaurav Khambhala
Re: ตอบ: Facebook Connect
 

I got this working after changing some files. Changes were required in auth.php file. There is also hardcoded path in facebook.js for disconnecting account.

 
Average of ratings: -
Picture of PRIYABRATA KUANR
Re: ตอบ: Facebook Connect
 

Can u please let me know on what changes i need to do to make it work with moodle 2.1

 
Average of ratings: -
Picture of Gaurav Khambhala
Re: ตอบ: Facebook Connect
 

Please attached files. There was no $DB defined and missing tags.

 
Average of ratings: -
Picture of PRIYABRATA KUANR
Re: ตอบ: Facebook Connect
 

Thanks Gaurav,  The login worked perfectly with the update smile..   Any pointers on how I can get live streams to work.. and in case you are already working on it .. let me know if i can contribute in any way

 
Average of ratings: -
Picture of David Martinez
Re: ตอบ: Facebook Connect
 

Hello all, this facebook_connect_2.1.zip is my update of the facebook_connect.zip from Aaron. I've changed more files than auth.php to make work also deauthentication. But still not working wall stream. Gaurav, as said by Priyabrata tell me if I can help you in any way.

Picture of Jen Andes
Re: ตอบ: Facebook Connect
 

Hi David.

Thanks for the attachment. I tried to install it, however when I click the "Log In with Facebook" button, nothing happens. It doesn't even redirect to any page.

Any help will be greatly appreciated. smile


Thanks! smile

 
Average of ratings: -
Picture of David Martinez
Re: ตอบ: Facebook Connect
 

Should appear a popup window, you may allow popup windows in your browser.

I've retested it in my new installation of moodle, and is working properly

Thanks.

 
Average of ratings: -
Picture of Mike Finney
Re: ตอบ: Facebook Connect
 

This is an awesome plugin. I am looking forward to using it, as we are looking for deeper and deeper integration with FB. I have attached a file showing an error message we are getting when people login using the Connect with FB. Can you tell me where the error is occurring? I am using 2.1 version of Moodle.

Sorry file won't attach. Here is the error message:

Error reading from database

More information about this error

 
Average of ratings: -
Picture of John Rutherford
Re: ตอบ: Facebook Connect
 

Thanks for your work on this David. I have not been quite able to get it all working though...

The FB option appears, the user can enter their FB username and password, it connects to their account but when the user presses to log in with FB there is a message which says "Error reading from database".

Any suggested resolutions greatly received!

 
Average of ratings: -
Picture of Nuno Lopes
Re: Facebook Connect
 

Hi,
I tried to add the feature Facebook Live Stream Boxto on my course and the following error came up "A help_icon object requires a $text parameter" 

Can you help me with this?

Thanks


 
Average of ratings: -
Picture of Gaurav Khambhala
Re: Facebook Connect
 
Nuno, Live Stream box needs some work to be done to run on 2.x versions of moodle.
 
Average of ratings: -
Picture of David Martinez
Re: Facebook Connect
 

Hi Nuno and Gaurav, I commented some lines (icon, by now, is not important for me), but as said by Gaurav, there's more work to do.

Gaurav, do you need my files? or you solved the facebook link with moodle account?

Thanx!

 
Average of ratings: -
Picture of Tobias Sopu
Re: Facebook Connect
 

I know you are busy, but I use the facebook connect in moodle 1.9  some how I cannot link the account, when I click the facebook connect button it takes me to facebook login. After logging in, my facebook profile shows up. but when I click log in using facebook account it gives me error

 

The requested URL /~toby/moodle/auth/facebook/undefined was not found on this server.

 

please advice.

 

thanks 

Tobias

 
Average of ratings: -
Picture of Tobias Sopu
Re: Facebook Connect
 

I know you are all busy, but I use the facebook connect in moodle 1.9  some how I cannot link the account, when I click the facebook connect button it takes me to facebook login. After logging in, my facebook profile shows up. but when I click log in using facebook account it gives me error

 

The requested URL /~toby/moodle/auth/facebook/undefined was not found on this server.

 

please advice.

 

thanks 

Tobias

 
Average of ratings: -
Picture of L Schoreman
Troubles with 2.0
 

I had the Moodle 2.0 version of the plugin installed, and with a few changes to the auth file (the ones someone kindly attached above,) and the way the config file was included, it was working.  Now, a few days later, it's not working anymore, and the error console in Firefox is saying that it's better to use "scope" than "perms" with the fb:login-button. 

No problem, I changed it to "scope"...but then a whole host of other problems occurred, and the plugin doesn't work anymore. 

Is there an easy fix, or will an updated version for Moodle 2.0 be available soon!  Thanks in advance!

 
Average of ratings: -
Picture of L Schoreman
Addition:
 

Here's the debug info for the above post: 

 

Debug info: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
SELECT userid FROM mdl_user_info_data WHERE data =
[array (
)]
Stack trace:
  • line 391 of /lib/dml/moodle_database.php: dml_read_exception thrown
  • line 759 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1256 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
  • line 92 of /auth/facebook/lib.php: call to moodle_database->get_record_sql()
  • line 95 of /auth/facebook/auth.php: call to facebook_get_moodle_id()
  • line 82 of /login/index.php: call to auth_plugin_facebook->loginpage_hook()
 
Average of ratings: -
Picture of L Schoreman
Re: Addition:
 

The error seems to be with the line:

$fb_user = $FB->getUser();

(which is line 94 in auth.php)

$fb_user comes back with no value...does anyone know why?

 
Average of ratings: -
Picture of Jen Andes
Re: Addition:
 

Hi,

I'm also having the same problem. Have you found a solution for this?

 

Thanks,

Jen

 
Average of ratings: -
Picture of David Martinez
Re: Addition:
 

Hi L Schoreman and Anna Pia, i think here's the problem:

http://developers.facebook.com/docs/reference/javascript/FB.login/

Facebook changed from december 13th... it never ends!! angry

I'm working on it, if you find something, please let me know...

 
Average of ratings: -
Picture of Jen Andes
Re: Addition:
 

Yes, I already fixed the problem by changing "perms" to "scope" in fb-login button. Also, I modified the FB.init by adding oauth : true .. I made some changes based on new fb api.

Also some variables in auth.php and lib.php are not compatible with moodle 2.1. 

 
Average of ratings: -
Picture of David Martinez
Re: Addition:
 

I also changed "perms" to "scope". and som response."something" to response."anotherthing" (I don't remeber exactly.

Can you pass me your facebook_connect folders or more detailed info about changes you made to your installation?

Thank you so much!

 
Average of ratings: -
Picture of L Schoreman
Re: Addition:
 

Changed perms to scope, added oauth: true, changed the include for the config.php to ../../ and used the modified auth.php file that fixed the missing $DB vars.

All of the above was working pre-Dec. 13, except the "scope" change; that one's new. 

 

Anna, would be interested as well to see your changes made. 

 
Average of ratings: -
Picture of Jen Andes
Re: Addition:
 

Hi David,

Aside from that, I also add oauth:true in FB.init. Most of the changes are made in auth.php and lib.php. I already done so much customization with the plugin for my project requirements that it doesn't look like the original codes already. See attached files.

I suggest you review the codes for function facebook_get_moodle_id in lib.php. Also, it seems that there is some error in reading the variable optional_param.

 
Average of ratings: -
Picture of David Martinez
Re: Addition:
 

Hey Jen! I've worked on files you send and find some differeces I wish you could explain:

1.- In auth.php

a) You created $data as: $data = new stdClass(); and in my version, I've create $data with: $data = new object();

b) You added a third case [if ($fb_login == 3) {]

2.- In lib.php

a) You've changed function facebook_get_moodle_id($fb_id) only for adapting to the new api from facebook?

I've updated my package with your updates (adding it in comments) and uploaded it to forum.

Can you show me your /auth/facebook/facebook_disconnect.php, I'm having serious problems with disconnecting accounts.

Wich facebook.php and base_facebook.php have you in /auth/facebook/facebook-sdk/ folder? the originals ones from Aaron or a newly downloaded? (I've downloaded the new ones)

Your wall stream is working?

Thank you so much!

 
Average of ratings: Useful (1)
Picture of Jen Andes
Re: Addition:
 

Hi David,

In regards to your questions:

1. In auth.php

a. you can use object(). I'm just doing some debugging when I modified it in stdclass()

b. I added the third case for my project requirements. It allows the first-time user to have an option to connect their fb account after they login using their student account.

2. In lib.php

a. Im still in the process of changing that part. Some errors occurs when I used the original code for getting a record ($DB->get_record_sql).

- See attached file for copy of facebook_disconnect.

- I have dowloaded a new facebook.php and base_facebook.php and replaced the original file from you.

- We don't really need the wall stream for now, so I don't bother to make it work. smile

Picture of David Martinez
Re: Addition:
 

Thanks for you answers... I detected a little mistake in one of my files.

I put your facebook_disconnect.php and it works great, thanks!

But... I have to call it manually, because when i go to edit advanced don't show disconnect button or link.

I think I need also /user/profile/field/facebook/field.class.php

and

/auth/facebook/facebook.js

 

It's possible? or I will need more files?

 

Thanks!!!

 
Average of ratings: -
Picture of Jen Andes
Re: Addition:
 

Hi David,

See attached file for copy of field.class.php and facebook.js. That's the only files I modified for facebook_disconnect.

In facebook.js, modify the code in line 9 by calling the exact location of facebook_disconnect.php. Also, you might find that I deleted and modified some codes. I only have to do that for my project requirements. Better not to replace your existing facebook.js... just copy/replace the codes you need. smile

 
Picture of David Martinez
Re: Addition:
 

Hi Jen and thanks for your files and your rapid answers

I've made what you told me, only change location of facebook_disconnect.php, and a little change of perms to scope in field.class.php

And it works... but... in a way I don't like so much... I'll explain...

I log in with facebook... go to my profile... edit my profile and in the bottom of the page appears a button saying [Log in with Facebook] when I've really been logged in with facebook. If I press this button, automatically refresh and appears my facebook picture and the link to facebook_disconnect.php than works great... It's normal? or I have something wrong??

I've tried with you facebook.js complet, and do the same.

THANKS!

 
Average of ratings: -
Picture of Jen Andes
Re: Addition:
 
Hi David, In my script, it works the same as the previous one (it automatically detect if the user is logged in facebook). I think it happens in your script because of some differences in our codes. If I have time this week, I'll try to finish the script then I'll give you a copy so you can see the other files I modified. smile
 
Average of ratings: -
Picture of David Martinez
Re: Addition:
 

Hi Jen! I've found it! The error was in /user/profile/field/facebook/field.class.php

In my line 39 the original seems like:

$mform->addElement('html', '<script type="text/javascript">FB.getLoginStatus(function(response) {if (response.session) {update_facebook_details();}});</script>');

I updated to:

$mform->addElement('html', '<script type="text/javascript">FB.getLoginStatus(function(response) {if (response.authResponse) {update_facebook_details();}});</script>');

And problem solved!

Thanks!

Later I will post my complete package into forum for testing...

 
Average of ratings: -
Picture of Jen Andes
Re: Addition:
 

Hi David,

Looking forward for your script. Thanks. smile

 
Average of ratings: -
Picture of David Martinez
Re: Addition:
 

Here comes, suggestions and found errors are welcome...

David.

 
Average of ratings: Useful (1)
Picture of Jen Andes
Re: Addition:
 

Hi David,

I need your help. We have students that are using proxy server and blocking the Facebook connect. Is there any way to create a seperate login for user that can't use Facebook. I'm kind of stuck here.

Any help will be greatly appreciated. Thanks. smile

 
Average of ratings: -
Picture of David Martinez
Re: Addition:
 

Hi Jen, sorry for answer too late...

I'm not sure if I understood your question...

If users can't login with Facebook, they can login by using Moodle user, not?

Best regards!

 
Average of ratings: -
Picture of Estela Montaldo
Re: Addition:
 

Hello, I need help. I installed your facebook:package and I can connect with facebook but when login with Moodle appers  this error "No se permiten comparaciones de las condiciones de columna de texto. Por favor, use sql_compare_text () en la consulta."  (Not allowed comparisons of the conditions of text column. Please usesql_compare_text () in your query.)

I atached the screens for more information.

Thanks very much and sorry my English.

 
Average of ratings: -
Picture of Estela Montaldo
Re: Addition:
 

Hi, I can solve the problem.

 
Average of ratings: -
Picture of sathish kumar
Re: Addition:
 

How did you solve that issue? I am getting the same error.

 
Average of ratings: -
Picture of L Schoreman
Re: Addition:
 

Hi Anna, to get it to work with 2.1 there is a package for 2.1 that David Martinez posted linked to above this post, just scroll up smile

 
Average of ratings: -
Picture of to towalle
Re: Addition:
 

Hi L Schoreman,

I have moodle 2.0.5 installed and I'm trying to find a way to get the module work. 

I'm using the revision 1.2.2.1 of the module with the proper installation notes that can be found here.

  • After the installation I changed "perms" to "scope" to make the facebook button work. I've changed it in /auth/facebook/login_form.html and in /user/profile/field/facebook/field.class.php because the facebook button was not working under the edit profile page in moodle.
  • I've also changed "response.session" to "response.authResponse" in the same files as facebook advises on the page.
  • Then added "oauth : true" in /auth/facebook/lib.php
  • At the end I changed "require($CFG->dirroot.'/config.php');" to "require('../../config.php');" in the /auth/facebook/facebook_disconnect.php.

OK these things fixed the buttons and the disconnect function but I get the same exceptions like you. It seems that the module does not write anything in the "mdl_user_info_data"  table when I try to link a moodle account with a facebook one uder Edit Profile page in Moodle.
The dml_write_exception:

Debug info: Column 'data' cannot be null

INSERT INTO mdl_user_info_data (userid,fieldid,data) VALUES(?,?,?)
[array (
0 => 2,
1 => '3',
2 => NULL,
)]
Stack trace:
  • line 394 of /lib/dml/moodle_database.php: dml_write_exception thrown
  • line 893 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 935 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
  • line 120 of /user/profile/lib.php: call to mysqli_native_moodle_database->insert_record()
  • line 427 of /user/profile/lib.php: call to profile_field_base->edit_save_data()
  • line 209 of /user/editadvanced.php: call to profile_save_data()

 

I'm assuming that if the table is empty moodle cannot take any information from it when I try to login from the /auth/facebook/login_form.html and thats the reason for the reading exception- dml_read_exception:

Debug info: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
SELECT userid FROM mdl_user_info_data WHERE data = 
[array (
)]
Stack trace:
  • line 391 of /lib/dml/moodle_database.php: dml_read_exception thrown
  • line 809 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1270 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
  • line 93 of /auth/facebook/lib.php: call to moodle_database->get_record_sql()
  • line 95 of /auth/facebook/auth.php: call to facebook_get_moodle_id()
  • line 82 of /login/index.php: call to auth_plugin_facebook->loginpage_hook()


I'm also getting an exception when I try to disconnect from facebook.

Please advice if you know a solution for the errors above.

Thank you in advance.
 
Average of ratings: -
Picture of L Schoreman
Re: Addition:
 

I'm pretty busy for a while but can take a look at the more advanced plugin questions soon...

 
Average of ratings: -
Picture of Roman Ganz
Re: Addition:
 

I have the same Error here using latest moodle and latest fb plugin.

See also here http://tracker.moodle.org/browse/CONTRIB-3032

 
Average of ratings: -
Picture of Peter Mocsi
Re: Facebook Connect
 

I accidentally download the version for moodle2 and install it. Then I downloaded the correct version for 1.9 and now reports "Version mismatch: Facebook can notdowngrade 2011082909 -> 2009101001". How to fix this.

thaks

 
Average of ratings: -
Picture of L Schoreman
Re: Facebook Connect
 

The easiest way is to trace back through all your steps - when you installed the plugin, you had to copy certain files to folders.  You will want to go through all of these and delete the new files you installed, basically going through the install instructions and then UNinstalling what you installed.  And, then hopefully you made a full backup of your Moodle database prior to installing the plugin--use this database backup to do a full restore as well, since the plugin install files will have created a few new tables and entries. 

 
Average of ratings: -
Picture of marina shorer
Re: Facebook Connect
 

Hi,

I have the plugin installed (although not added to header.html - just to any HTML code on the front page). BUT

while showing up on the registraiton page and clicked - NOTHING is happenning - no login fileds showing, no changes at all. 

What can be the reason? Should I activate something in Facebook or Moodle itself? Or edit the header.html file in my themes directory and add facebook namespace to the HTML tag

otherwise it wouldn't work?

Also, the "Login with Facebook" is showing in Chrome and Firefox and but no button of "LogIn with Facebook" in Explorer (ver.9). Any solutions?

 
Average of ratings: -
Picture of to towalle
Re: Facebook Connect
 

Probably you need to switch the word "perms" with "scope"  in the files /auth/facebook/login_form.html(~line 12) and /user/profile/field/facebook/field.class.php(~line 37) - as facebook requested- check here.

One advice is to provide a little bit more information like the moodle and the plugin version. Othewise it will be more difficult to get the proper help smile

 
Average of ratings: -
Picture of Sowi So
Re: Facebook Connect 2.2
 

Hi,

I tried to get the login working on my Moodle 2.2.1
Install went okay, apart from that I don´t know where to put the namespace?

When click the login button now, I get an error message, saying:
"An error occurred. Please try again later."

login is:
http://www.wiskundeschool.nl/moodle/auth/facebook/login.php

any suggestion to get things going?
thanks for any help

 
Average of ratings: Useful (1)
Picture of Estela Montaldo
Re: Facebook Connect 2.2
 

Hi, I was trying to access your page and I got it, so annoying to see if you can help me with a problem I have, is that achieving access my site through Facebook but when I log off and try to use another user (login to Facebook) but Moodle is still connectedwith the first user. Only if I cancel the first user I can connect with another.
Thanks for any help you can offer me.

 
Average of ratings: -
Picture of Sowi So
Re: Facebook Connect 2.2
 

Hi, we ended up using a different plugin:

http://moodle.org/plugins/view.php?plugin=auth_googleoauth2

 
Average of ratings: -
Picture of hendrik tampubolon
Re: Facebook Connect
 

Dear..Aaron..

i h'v install moodle 1.9.17

I have followed the installation steps as in the readme file


Installation:

1. You will need to register your site with Facebook before you can use this module.

2.  Go to http://www.facebook.com/developers, add the applicatin if you have not done so already, then create a new Facebook application.
    Each Connect website is treated as a Facebook application, and so it needs an Application ID.
    Fill in these fields:
      * Application Name: this will be what your users will see when they connect to your site.
      * Terms of Service: Select Agree. The Developer Terms of Service govern among other things how you can use the information on your site. Pay particular attention to section G, Facebook Connect.
      * Connect URL: This is the root URL of your Moodle site.
    Submit your application, and make note of your Application ID and Secret.

3. Move the contents of the 'auth' directory to your Moodle 'auth' directory.

4. Move the contents of the 'user' directory to your Moodle 'user' directory.

5. Move the contents of the 'mod' directory to your Moodle 'mod' directory.

6. Edit the header.html file in your themes directory and add facebook namespace to the HTML tag
    eg. <html xmlns:fb="http://www.facebook.com/2008/fbml">

7. Go to your main Moodle admin page (Site Administration > Notifications)

8. Go to (Modules > Activities > Manage Activities) and enable the 'Facebook Live Stream Box' by clicking on the 'eye' icon.

9. Enter the Secret and Application ID keys when prompted

10. Go to (Modules > Activities > Manage Activities) and enable the 'Facebook Live Stream Box' by clicking on the 'eye' icon.

11.  Go to (Users > Accounts > User profile fields) and add a new 'Facebook' profile field.

12. Give the profile field a Short name ("facebook" suggested), Name ("Facebook" suggested) and click 'Save Changes'

13. Go to (Users > Authentication > Manage Authentication) and enable the 'Facebook' module by clicking on the 'eye' icon.

Assuming you don't run into any problems, you should be ready to go.



---------------------------------------------------------------

Replace Moodle profile pictures with Facebook profile pictures

--------------------------------------------------------------


To replace Moodle profile pictures with Facebook profile pictures a modification needs to be made a core Moodle file.



1. Take a backup copy of the lib/weblib.php file



2. Open the lib/weblib.php file and find the line (about line 4470) which reads:

    $output .= "<img class=\"$class\" src=\"$src\" height=\"$size\" width=\"$size\" alt=\"".s($imagealt).'"  />';


    
3. Delete this line and replace it with the following code:

    require_once($CFG->dirroot.'/auth/facebook/lib.php');

    $fb_uid = facebook_get_facebook_id($user->id);

    if ($fb_uid && $CFG->facebook_profile_pic == 1) {

      facebook_javascript();

      $output .= "<fb:profile-pic uid='$fb_uid' facebook-logo='true' width='$size' size='normal'></fb:profile-pic>";

    } else {

      $output .= "<img class=\"$class\" src=\"$src\" height=\"$size\" width=\"$size\" alt=\"".s($imagealt).'"  />';

    }

 

4. Go into Administer > Modules > Activities > Facebook Live Stream Box and tick the tick box "Replace profile pictures"
Build date: Sat Mar 31 09:23:25 WST 2012
Package definition: facebook_package:auth/facebook;mod/facebook;user/profile/field/facebook

 

BUT when i click login with facebook there are something problem

 


 
Average of ratings: -
Picture of Tobias Sopu
Re: Facebook Connect
 

Hi hendrik,

just a guessing, did you configure your API correctly, just by looking at the errors, This is a great one...thanks for putting it up...

cheers

 

 
Average of ratings: -
Picture of stuti bhavsar
Re: Facebook Connect
 

I am using moodle 2.2 and I want to integrate facebook in it so that user can login through their facebook account.

Can you please instruct me how to implement facebook connect in my site?

 
Average of ratings: -
Picture of Steve H.
Re: Facebook Connect
 

I would like to get information on how to enable this as well.

 
Average of ratings: -
Picture of Andy Tang
Re: Facebook Connect 2.2
 

I have installed the facebook package onto my moodle but I do not know what to edit as there is no header.html file in the theme directory. My moodle version is 2.2.1 please help me! 

 
Average of ratings: -
Picture of Alex Anon
Svar: Re: Facebook Connect 2.2
 

header.html doesnt exit in moodle 2.2 because they have changed the theme structure. anyways if you go to moodleroot/theme/base/layout/general.php 

and replace 
<html <?php echo $OUTPUT->htmlattributes() ?>>
with
<html xmlns:fb="http://www.facebook.com/2008/fbml">

 
Average of ratings: Useful (1)
Picture of Suresh Dhanakotti
Re: Facebook Connect
 

Hi,

Thanks for the great plugin. Every thing is working fine except when I first Login with my Facebook account and logged out again My friend logged in with is Facebook account but in Moodle it showing my account. Can any one tell me what the issue is?

 
Average of ratings: -
Picture of Alex Anon
Svar: Re: Facebook Connect
 
What version of moodle are you using?
 
Average of ratings: -
Picture of Tobias Sopu
Re: Facebook Connect
 

Hi Suresh,

what moodle version are you using?

 
Average of ratings: -
Picture of Tobias Sopu
Re: Facebook Connect
 

Another problem with this plugin...when you logout from moodle....you are still logging in to facebook.....and your name is still shown as the one below...Which means....you must logout from your Facebook if you have multiple tabs in your browser and one of them with your facebook account logged in...anybody can just click "log in with facebook account" because your fb ac and moodle account already linked.....

 

Make sure you log out from moodle AND facebook.....

If your friends has moodle id in the same moodlesite and "Sandbox" Mode is disabled in the facebook app.....she can link her accounts

 
Average of ratings: -
Picture of Pablo García
Re: Facebook Connect
 

Hi Aaron,
in moodle 2.3.3 version of the Facebook connect I get the following error after install:
--------------------------------------------------------------------------------------------------------------------------
Error reading from database
Debug info: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
SELECT userid FROM mdl_user_info_data WHERE data =
[array (
)]
Error code: dmlreadexception
Stack trace:

    line 407 of /lib/dml/moodle_database.php: dml_read_exception thrown
    line 966 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
    line 1360 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
    line 94 of /auth/facebook/lib.php: call to moodle_database->get_record_sql()
    line 96 of /auth/facebook/auth.php: call to facebook_get_moodle_id()
    line 82 of /login/index.php: call to auth_plugin_facebook->loginpage_hook()
--------------------------------------------------------------------------------------------------------------------------

Is there any solution to this bug?
Thank you very much!
Pablo from Rosario, Argentina

 
Average of ratings: -
Picture of James Snell
Re: Facebook Connect
 

Hi Rosario,

I too am having this problem.. I just did a fresh Moodle 2.x install on a fully updated Ubuntu 12.04 server.

Any tips or suggestions would be very much appreciated!

 

My message reads:

Debug info: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
SELECT userid FROM mdl_user_info_data WHERE data =
[array (
)]
Error code: dmlreadexception
Stack trace:
  • line 426 of /lib/dml/moodle_database.php: dml_read_exception thrown
  • line 1023 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1382 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
  • line 92 of /auth/facebook/lib.php: call to moodle_database->get_record_sql()
  • line 95 of /auth/facebook/auth.php: call to facebook_get_moodle_id()
  • line 82 of /login/index.php: call to auth_plugin_facebook->loginpage_hook()

 

 

 
Average of ratings: -
Picture of James Snell
Re: Facebook Connect
 

I decided to switch to Google oauth. I got it working fairly quickly.

http://moodle.org/plugins/view.php?plugin=auth_googleoauth2

(I saw someone had previously posted this url, I'm reposting here at the bottom so others may find it faster than I did.)

 
Average of ratings: -
Picture of Seth Mengal
Re: Facebook Connect
 

How did u manage to make the Login Page work?

I cannot still find where to paste the code? :/

 
Average of ratings: -
Picture of Tobias Sopu
Re: Facebook Connect
 

Aaron,

Up to what version that this facebook connect could work?

Will it work in the 2.2 moodle?

 

please advice

cheers

 
Average of ratings: -
Picture of Tobias Sopu
Re: Facebook Connect
 

how about facebook comment box???

 
Average of ratings: -
Picture of Benjamin Stewart
Re: Facebook Connect
 

Something similar for Google+?

 
Average of ratings: -
Picture of Tobias Sopu
Re: Facebook Connect
 

Yes...I believe, but I have never tried google+...have you?

 
Average of ratings: -
Picture of Joao Almeida
Re: Facebook Connect
 

Hello, 

I'm having difficulty connecting facebook into my moodle (2.4.3). I have done all the steps but when i try to log in with my facebook account, it does not work.

Can somebody help me? 

 
Average of ratings: -
Picture of Tobias Sopu
Re: Facebook Connect
 

which package did your use...try using this package...I downloaded it and modify little...it works for mine......

If you follow the instruction provided on moodle webiste and ReadMe file....

then change all copied folders (facebook folders and subfolders) and files permission to moodle standard permission....

folder - 755

files - 644

Let me know if this works....I'm still working on facebook discussion.....other can helpout if can...

cheers

credit : Martinez

 

 
Picture of Tobias Sopu
Re: Facebook Connect
 

By the way...

make sure you create facebook application

Only you (developer) can log in to moodle with facebook....if you add testers....and others....they could login with fb account.....

 

others cannot because the Sandbox Mode is enabled....only developers and admin

 

cheers

 

 
Average of ratings: -
Picture of dante casalena
Question on facebook package
 

Hi, i am using your plug-in for my university's application  and i have a question for how work il plug-in. If the user would log in moodle through facebook, but in the moodle DB, the user isn't stored, then moodle creates a new user and it logs the user in? Thanx for your time!! 

 
Average of ratings: -
Picture of Tobias Sopu
Re: Question on facebook package
 

I think thats how it suppose to work...however...I notice there is only one table created in the db ... which is just for the forum discussion using facebook...there is an id ....however we wish to make any posting through facebook in moodle to be stored in moodle db....still studying the codes....

 

 

 
Average of ratings: -
Picture of Enrique Berrueta Zapata
Re: Facebook Connect
 

I got some problemas with the plugin. Downloaded version 2.1.3. When trying to login error found:

No se permiten comparaciones de las condiciones de columna de texto. Por favor, use sql_compare_text () en la consulta.

Más información sobre este error

Stack trace:
  • line 513 of /lib/dml/moodle_database.php: dml_exception thrown
  • line 1535 of /lib/dml/moodle_database.php: call to moodle_database->where_clause()
  • line 97 of /auth/facebook/lib.php: call to moodle_database->record_exists()
  • line 96 of /auth/facebook/auth.php: call to facebook_get_moodle_id()
  • line 82 of /login/index.php: call to auth_plugin_facebook->loginpage_hook()

Also need to sync profile pictures, but i havent found the code on the instructions to replace.

 
Average of ratings: -
Picture of Enrique Berrueta Zapata
Re: Facebook Connect
 

I have fixed it. 

The problem was the function in auth/lib.php:

function facebook_get_moodle_id($fb_id) {
global $DB;
$data = $DB->get_record('user_info_field', array('datatype' => 'facebook'), 'id');
$fieldid = $data->id;

if ($fieldid) {
//@updated by Jen Pia
//$data = $DB->get_record_sql("SELECT userid FROM {user_info_data} WHERE data = ". $DB->sql_compare_text($fb_id));
//$userid = $data->userid;

$fbdata = $DB->record_exists('user_info_data',array('data' => $fb_id));
if ($fbdata){
$data = $DB->get_record_sql('SELECT userid FROM {user_info_data} WHERE data=?', array($fb_id));
$userid = $data->userid;
}else{
$userid = '';
}
}

return $userid;
}

Replace with: 

function facebook_get_moodle_id($fb_id) {
global $DB;
$data = $DB->get_record('user_info_field', array('datatype' => 'facebook'), 'id');
$fieldid = $data->id;

if ($fieldid) {
$data = $DB->get_record_sql("SELECT userid FROM {user_info_data} WHERE data = ". $DB->sql_compare_text($fb_id));
$userid = $data->userid;
}

return $userid;
}

 

 
Average of ratings: -
Picture of Enrique Berrueta Zapata
Re: Facebook Connect
 

Need some help with the pictures sync. I have no problems with account sync, but my pictures doesnt change. 

I dont know were to replace the code.

 

 
Average of ratings: -
Picture of Tobias Sopu
Re: Facebook Connect
 

I am still working on it. I have the same problem too. But can you create a forum?

 
Average of ratings: -
Picture of Tobias Sopu
New Facebook Module Development
 

I am in the process of developing a facebook module for moodles. This development is evolved from Aaron's development of facebook package available for moodle 1.9 and 2.0. I am currently developing the module for moodle 2.4 and 2.5. I have finished installing the module, students are able to login using facebook account and link with moodle account. Teacher can be able to add a facebook module and moderate the facebook discussion as you can see on the picture below, I am the moderator of the discussion. The idea is to engages students in online participation especially in online collaboration. 

 

I wish to further develop an evaluation feature where the teacher can evaluate students, comments using facebook comment box. A evaluation feature where teacher can give points to students base on the facebook discussion. Please advice. you can access this site on www.fb.e-tongalink.org with username : student and password : Student@01. This user name is already enrolled in the only course that has the discussion from the screenshot below. I will be looking forward for your advice and direction. 

 

Cheers

Tobias

 

Screenshot of one of the forums using facebook comments box. 

 
Average of ratings: Useful (2)
Dr.Jury N.Belonozhkin
Re: New Facebook Module Development
 

Hi Tobias!
Please place here full facebook package. Thank's before!

 
Average of ratings: -
Picture of Anwar Deen
Re: Facebook Connect
 

Hi,

I am new to Moodle. I need to integrate Facebook connect for registration and get the user information from Facebook via oAuth. But the problem is, after download this plugin and while install i got an error like "Invalid structure of the ZIP package". Please help me to resolve this and gett he functionality for facebook integration.


Thanks in Advance.

Anwardeen


 
Average of ratings: -
Picture of Emma Richardson
Re: Facebook Connect
Group Documentation writersGroup Particularly helpful Moodlers

Did you download to your computer and upload or install directly from the plugin directory?

Try redownloading the plugin.  Then, make sure that you DO NOT open and recompress the zip package, especially if using a Mac.  I have found that Mac's nasty habit of adding hidden files to folder will cause this error.

 
Average of ratings: -