Loading


Author Topic: Facebook Login  (Read 22929 times)

beebo

  • Newbie
  • *
  • Posts: 15
Facebook Login
« on: January 09, 2011, 06:16:38 am »
Hello,

I was just wondering if there is a possibility to add an option to have a Facebook login? if not, is it hard to add it?

Juan Ramón

  • Osclass Developer
  • Hero Member
  • *****
  • Posts: 2386
    • osclass.org
    • Email
Re: Facebook Login
« Reply #1 on: January 11, 2011, 01:08:42 pm »
Now there isn't implemented and there aren't hooks in user login... we should insert some hooks in core of OSClass... I've just created a JIRA: http://issues.osclass.org/browse/OSCLASS-285

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 3717
Re: Facebook Login
« Reply #2 on: January 11, 2011, 01:22:50 pm »
Hi,

This is a must! Don't worry it will be done soon.

Thanks

beebo

  • Newbie
  • *
  • Posts: 15
Re: Facebook Login
« Reply #3 on: January 12, 2011, 05:43:27 am »
great! How soon will that be?  ;D

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 3717
Re: Facebook Login
« Reply #4 on: January 12, 2011, 10:07:40 am »
Soon!

I already started with it, but I'm experiencing some errors with the Facebook's library. Unless a major problem, it should be included on next week's released. And added to development code in one or two days.

beebo

  • Newbie
  • *
  • Posts: 15
Re: Facebook Login
« Reply #5 on: January 13, 2011, 03:53:05 am »
Awesome!! you're the best :D


btw: If you want an Arabic translator, I might be able to help, I'm just not sure if it would break anything because of the characters. Let me know what you think.

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 3717
Re: Facebook Login
« Reply #6 on: January 13, 2011, 10:14:57 am »
Hi beebo,

That sounds great. We'll be very happy if you wanna help us with the arabic translations. It was translated to Hebrew, so I think it will not break anything, but who knows! I'll talk with Juan Ramón, who knows more than me about translation and one of us will contact you soon.


Tha Facebook login plugin is done (yeah! we work that fast), you can grab a copy from our new git-repository for plugins ( https://github.com/osclass/osclass-plugins ), but IT'S NOT FINISHED YET. I mean, it works (at least on my test server) but I have to test it outside, add some more options and a little of Help/FAQ/Instructions (but it really easy to use). I hope I could upload a stable and tested version in a few hours. (btw, it's called "Social Connect" and it's located in develop "branch")


Thanks!

beebo

  • Newbie
  • *
  • Posts: 15
Re: Facebook Login
« Reply #7 on: January 14, 2011, 03:40:12 am »
Sweet guys!! The Facebook connect was a major thing.. it's great that you got it.

Yup, Juan already talked to me so i'll be in touch with him.

beebo

  • Newbie
  • *
  • Posts: 15
Re: Facebook Login
« Reply #8 on: January 17, 2011, 02:39:01 am »
btw no trace of the facebook download anywhere

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 3717
Re: Facebook Login
« Reply #9 on: January 17, 2011, 02:51:31 am »
Beebo, you're right.

I couldn't release it to the public yet. A beta version is already on git repository, but it has some problems (sometimes it can not logout the user, sometimes it can not login). With the addition of my ISP not doing its jobs (several downtimes) I couldn't solved the problem yet (the in-existen FB's documentation doesn't help).

Anyway, I'm working on that, it's my top priority (it's unfinished) so you'll have it this week.

Thanks!

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 3717
Re: Facebook Login
« Reply #10 on: January 17, 2011, 03:48:35 pm »
Hi beebo,

Check this out : http://sourceforge.net/projects/osclass/files/Plugins/social_connect.zip/download

Please, have in mind this is a BETA version, while it was working under my development server... I really don't know what will happen out there. Facebook's documentation does NOT exists, API calls are undocumented and the official and provided SDK's have several bugs and fails.

That means: It's working, but I'm not sure why it wasn't working before, so test it and I'll fix bugs.

After installing it, click on configure to configure it (help screen with all the information will be displayed).

Thanks.

beebo

  • Newbie
  • *
  • Posts: 15
Re: Facebook Login
« Reply #11 on: January 18, 2011, 05:02:53 am »
my site is still in development too so i wouldn't mind testing for you guys.

Right now, it looks like all it does is just log me off of facebook and gives this error "Some error occured trying to connect with Facebook."

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 3717
Re: Facebook Login
« Reply #12 on: January 18, 2011, 11:13:13 am »
Did you specify your siteURL on the facebook configuration page? when you create a new app on facebook.com it will ask you for same data (app name, your email,...) it DOES NOT ask you for the "site URL", but you HAVE TO configure it in order to work (Not sure why facebook don't make that a compulsory field, well, I know why, but it's a stupid reason).

The missing of that field make that error (I already added that information on the help of the plugin).

I also fixed a minor problem, you should check out this new version:
http://sourceforge.net/projects/osclass/files/Plugins/social_connect.beta1.zip/download

Thanks

beebo

  • Newbie
  • *
  • Posts: 15
Re: Facebook Login
« Reply #13 on: January 22, 2011, 10:42:54 pm »
ok so the new connect seems to be a lil better

Now I get this error at the top

Quote
Notice: Undefined index: s_email in /var/www/vhosts/sellmyunibooks.com/httpdocs/testing/oc-content/plugins/social_connect/index.php on line 232

Notice: Undefined index: s_name in /var/www/vhosts/sellmyunibooks.com/httpdocs/testing/oc-content/plugins/social_connect/index.php on line 233
An automatic account for Sell My Uni Books has been created.
An activation email has been sent to your email address.

I didn't get an email to activate the account though, I checked under the users and the user has been created with the correct information and email, but i still didn't get the email to activate the account.

Once I activate the account from admin area, it logs in fine, everything seems to work, but then the facebook button changes from "log out" to "Connect with Facebook" maybe once we're logged in, we can get rid of the facebook button, because pple don't want to log out of facebook, they can just log out of the site or stay logged in as long as they're logged in to facebook. Then the next time they want to log back in they can use the facebook connect button.
« Last Edit: January 22, 2011, 10:49:36 pm by beebo »

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 3717
Re: Facebook Login
« Reply #14 on: January 27, 2011, 01:02:50 pm »
Hi beebo, the problem is already fixed.


It's on the development branch, if you want to quick-fix it
go to lines 323 and change $_POST['s_email'] to $user['s_email']

go to line 233 and change $_POST['s_name'] to $user['s_name']


About the logout button, we'll take that into consideration, Facebook's documentation isn't great (it's a bag full of nothing) so we could not make the plugin as we expected. We want to introduce some changes in the way it works. For example, once  you login with your OSClass account, it should be able to login in the Facebook session as well (you will be logged in only in OSClass' Facebook, not in the original Facebook) but the official example and documentation here is not working at all. Funny, isn't it?

As we consider other features of OSClass more important, we can not spend more time (right now) with this plugin. We're sorry for any inconvenience, we are aware that this feature is wanted and needed by a big percentage of OSClass' users, but we are doing our best.

Thanks