Wedge

Public area => The Pub => Plugins => Topic started by: Dragooon on March 23rd, 2012, 08:22 AM

Title: [Plugin] Facebook for Wedge
Post by: Dragooon on March 23rd, 2012, 08:22 AM
Because there had to be one, fairly basic plugin for Wedge. Aims at providing simple integration with Facebook.

Current features:
- Facebook logging in and quick registering
- Real time callback updates of name and birthdate
- Publishing new topics to wall
- Publishing new thoughts to wall
- Posting new status updates as thoughts

Requires a simplistic setup which will not take more than 5 minutes, instructions will be posted once it's released.

Screenshots attached.
Title: Re: [Plugin] Facebook for Wedge
Post by: Arantor on March 23rd, 2012, 08:48 AM
Wow, simply wow.
Title: Re: [Plugin] Facebook for Wedge
Post by: Dragooon on March 23rd, 2012, 09:05 AM
Quote from Arantor on March 23rd, 2012, 08:48 AM
Wow, simply wow.
Thanks :D
Title: Re: [Plugin] Facebook for Wedge
Post by: billy2 on March 23rd, 2012, 09:25 AM
That is fantastic. Nice work :cool:
Title: Re: [Plugin] Facebook for Wedge
Post by: Nao on March 23rd, 2012, 09:55 AM
I never got around to implementing reposting of thoughts to Twitter (which was, I'm a bit ashamed, my original plan :P), so it's good that someone at least considers reposting them automatically to Facebook :)
Title: Re: [Plugin] Facebook for Wedge
Post by: MultiformeIngegno on March 23rd, 2012, 12:44 PM
Really, wow!! My compliments!! :cool: :cool: :cool:
Title: Re: [Plugin] Facebook for Wedge
Post by: Pandos on March 23rd, 2012, 12:50 PM
Great!
The only thing left is to implement the like button.
Title: Re: [Plugin] Facebook for Wedge
Post by: Nao on March 23rd, 2012, 12:53 PM
Quote from Pandos on March 23rd, 2012, 12:50 PM
Great!
The only thing left is to implement the like button.
Reusing the Wedge feature would be good.
With a profile setting to disable communication with FB if one doesn't want to share likes over there? Or maybe a per-post choice.
And making sure not to share the like if done on a non-public topic.
Title: Re: [Plugin] Facebook for Wedge
Post by: Dragooon on March 23rd, 2012, 01:40 PM
I need a hook for that :P
Title: Re: [Plugin] Facebook for Wedge
Post by: Arantor on March 23rd, 2012, 02:02 PM
Like/unlike has a hook... :whistle:
Title: Re: [Plugin] Facebook for Wedge
Post by: Dragooon on March 23rd, 2012, 02:04 PM
Quote from Arantor on March 23rd, 2012, 02:02 PM
Like/unlike has a hook... :whistle:
That's for external likes(Which I know nothing about). There's no hook when a message gets liked.
Title: Re: [Plugin] Facebook for Wedge
Post by: Arantor on March 23rd, 2012, 02:17 PM
Ah, I see.

That shouldn't be a problem to add :)
Title: Re: [Plugin] Facebook for Wedge
Post by: Nao on March 23rd, 2012, 02:22 PM
That's the joy/curse of a plugin system. We'll have to add plenty of hooks to accomodate for plugins. But as long as the request is understandable, we'll do it Ouiz pléjeuh[1].
 1. © Jean Dujardin.
Title: Re: [Plugin] Facebook for Wedge
Post by: MultiformeIngegno on March 23rd, 2012, 03:55 PM
Quote from Nao link=msg=276121
we'll do it Ouiz pléjeuh[1].
 1. © Jean Dujardin.
ahahah
Title: Re: [Plugin] Facebook for Wedge
Post by: Arantor on March 23rd, 2012, 04:30 PM
Which reminds me. Watch this video(http://www.youtube.com/watch?v=Zp1BYzIVi0U#ws), specifically the bit I'm thinking of is 3:58 onwards :D
Title: Re: [Plugin] Facebook for Wedge
Post by: Dragooon on March 23rd, 2012, 04:44 PM
Quote from Arantor on March 23rd, 2012, 04:30 PM
Which reminds me. Watch this video(http://www.youtube.com/watch?v=Zp1BYzIVi0U#ws), specifically the bit I'm thinking of is 3:58 onwards :D
Fantastic
Title: Re: [Plugin] Facebook for Wedge
Post by: Antes on March 23rd, 2012, 06:35 PM
0.o awesome!
Title: Re: [Plugin] Facebook for Wedge
Post by: agent47 on March 24th, 2012, 11:09 AM
Fantastic work Dragoon!
Title: Re: [Plugin] Facebook for Wedge
Post by: Farjo on March 24th, 2012, 01:16 PM
Hey Dragoon that looks really professional and tidy :cool:
Title: Re: [Plugin] Facebook for Wedge
Post by: Arantor on March 24th, 2012, 06:18 PM
It hasn't been explicitly stated but I'll reiterate the point here that should surprise some of you.

There are precisely zero files here. The plugin system does not permit file edits in any fashion, this is all handled between a combination of the plugin hooks and the template skeleton system.
Title: Re: [Plugin] Facebook for Wedge
Post by: Pandos on March 24th, 2012, 06:28 PM
This is the way it's meant to be. :)


Can't wait to change to wedge. So i never have to fear about updates because of Mods that are nested in sourcecode.


Great stuff
Title: Re: [Plugin] Facebook for Wedge
Post by: Dismal Shadow on March 25th, 2012, 05:27 PM
Thought SA's mod would be ported to Wedge eventually but dragooon already caught up.
Title: Re: [Plugin] Facebook for Wedge
Post by: live627 on March 25th, 2012, 06:52 PM
Is SA even here?
Title: Re: [Plugin] Facebook for Wedge
Post by: Arantor on March 25th, 2012, 06:57 PM
Nope.
Title: Re: [Plugin] Facebook for Wedge
Post by: live627 on March 25th, 2012, 07:25 PM
And even if he was, and if he wanted to port his  mod, most likely it would be after Wedge is declared stable.
Title: Re: [Plugin] Facebook for Wedge
Post by: Dismal Shadow on March 25th, 2012, 08:28 PM
Quote from live627 on March 25th, 2012, 07:25 PM
And even if he was, and if he wanted to port his  mod, most likely it would be after Wedge is declared stable.
That's not the point, there was a time he heard about Wedge months ago where we talked about FB plugin for Wedge. But it is already done, a official one.
Title: Re: [Plugin] Facebook for Wedge
Post by: Nao on March 25th, 2012, 09:53 PM
Dragooon's mod is not an official Wedge mod for now but once it's ready for use I'm perfectly willing to push it as such. Heck, all of our consultants are gifted authors who do great justice to the Wedge spirit. :)
Title: Re: [Plugin] Facebook for Wedge
Post by: live627 on March 25th, 2012, 11:31 PM
/like msg276275
Title: Re: [Plugin] Facebook for Wedge
Post by: Dragooon on March 26th, 2012, 01:55 PM
Honestly, I suck at providing support and updates for my plugins and mods, so I try and make it fairly feature complete at first so that I don't have to do much to maintain it. For the same reason I'm afraid of it being an official plugin, not that I mind it being one.
Title: Re: [Plugin] Facebook for Wedge
Post by: Nao on March 26th, 2012, 02:28 PM
Quote from Dragooon on March 26th, 2012, 01:55 PM
Honestly, I suck at providing support and updates for my plugins and mods, so I try and make it fairly feature complete at first so that I don't have to do much to maintain it. For the same reason I'm afraid of it being an official plugin, not that I mind it being one.
Official = the team maintains and supports it ;)
If you want, of course!

I think I did a good job of maintaining and supporting your SMF Media Gallery ;)
Title: Re: [Plugin] Facebook for Wedge
Post by: Dragooon on March 26th, 2012, 02:29 PM
Quote from Nao on March 26th, 2012, 02:28 PM
Quote from Dragooon on March 26th, 2012, 01:55 PM
Honestly, I suck at providing support and updates for my plugins and mods, so I try and make it fairly feature complete at first so that I don't have to do much to maintain it. For the same reason I'm afraid of it being an official plugin, not that I mind it being one.
Official = the team maintains and supports it ;)
If you want, of course!

I think I did a good job of maintaining and supporting your SMF Media Gallery ;)
Hey, I did stuff too :P....
Ofcourse, I'd love that.
Title: Re: [Plugin] Facebook for Wedge
Post by: Arantor on March 26th, 2012, 07:04 PM
Dragooon, I completely understand your position; this is pretty much the same stance I take - if I build it well enough it should stand alone without needing much support later on :)
Title: Re: [Plugin] Facebook for Wedge
Post by: Dragooon on December 3rd, 2012, 08:13 PM
Did a very quick test run of this on current trunk and it seems to work fine without any changes (which is very surprising and awesome BTW). Uploaded to AeMe, but it CAN and probably WILL crash and burn. Hopefully it doesn't :P
Title: Re: [Plugin] Facebook for Wedge
Post by: Dragooon on June 28th, 2013, 02:46 PM
/mewonders if this thing still works with Wedge.
Title: Re: [Plugin] Facebook for Wedge
Post by: Nao on June 28th, 2013, 04:34 PM
Am I supposed to install it and try to break the site, or something..? ;)
Title: Re: [Plugin] Facebook for Wedge
Post by: Dragooon on June 28th, 2013, 05:22 PM
Quote from Nao on June 28th, 2013, 04:34 PM
Am I supposed to install it and try to break the site, or something..? ;)
Hehe, nope. I'll test it in a few days and see if it needs some fixing.
Title: Re: [Plugin] Facebook for Wedge
Post by: Nao on February 5th, 2014, 01:52 PM
Lol... I totally forgot about this topic. I saw it in the 'Top liked topics' stat area. (There's a post of mine in area that got liked a lot.)

The repo is actually public:
https://github.com/Dragooon/WeFB

It's just that it hasn't been updated in 2 years, meaning it's not compatible with Wedge right now, because of all the code changes.
I'll just it a try ASAP, though. Once I get it working, I'll move it to the plugins repo.

Everyone happy with that? ;)
Title: Re: [Plugin] Facebook for Wedge
Post by: Farjo on February 5th, 2014, 02:08 PM
:)
Title: Re: [Plugin] Facebook for Wedge
Post by: Nao on February 5th, 2014, 03:08 PM
It's progressing. The plugin is now installed as a test on my local forum, but it's not showing anything yet. Still, installing it wasn't straightforward, so first step is done.
Title: Re: [Plugin] Facebook for Wedge
Post by: Nao on February 5th, 2014, 05:49 PM
Okay, managed to go through the login process after fixing many problems...

So, just go to say:

- It's awfully slow on the Facebook side. I don't know why. It took like 10 seconds to load...
- Facebook asks you for permissions, one by one. How stupid is that..!
- If I refuse a permission, I'm still logged in, but the plugin doesn't say anything special.
- And now for the most amusing thing... Once I'm logged in, I'm faced with a special plugin page that tells me my name, fills in the user name (from Facebook), offers me to change it and, wait for it... Enter a password. Then verify it. And if I don't enter a password, I'm sent back to the password page.

Meaning this process:

- Actually takes a lot longer than a regular registration process,
- Completely bypasses the Registration agreement (it's okay if you're already a user of course, but... On the first registration..?!)
- Doesn't save you from choosing a password. I don't know why this is of any use. Security this, security that... What's the point? An admin is never going to login via Facebook anyway... And who says it isn't a safe process?

All in all, I'm quite disappointed.
I'll commit the plugin, and enable it here for 'testing', but I don't have much hope in it until it gets improved, namely:
- showing the registration agreement, at least on the page that asks for a password,
- not making a password mandatory,
- telling you what Wedge can do if you refused some permissions,
- allowing you to choose your permissions from the start (not sure..?),
- adding a Facebook profile link somewhere in your profile,
- getting more data from Facebook if possible, such as website link..?
- allowing you to get your list of friends, and see who's already there.

Phew...

Shitiz, you still there? :P
Title: Re: [Plugin] Facebook for Wedge
Post by: Farjo on February 5th, 2014, 07:51 PM
:-/
My current hostel's internet is poor but I will test what I can later this week.

We don't have a user agreement so that's no problem :)
Title: Re: [Plugin] Facebook for Wedge
Post by: madfitz on February 5th, 2014, 08:08 PM
I just installed it and when activated I get this:

httpp://mydomain.com/index.php?action=admin;area=plugins
2: Invalid argument supplied for foreach()
File: /home/username/public_html/mydomain/gz/app/Subs-Plugins.php
Line: 828

That path... gz/app/

Should be core/app surely? :hmm:
Title: Re: [Plugin] Facebook for Wedge
Post by: Nao on February 5th, 2014, 09:56 PM
No, it's gz/app. Don't worry about that. It's the cache.

And yes, this error exists because of an old Pete bug in plugins. I think I pushed that commit to the repo this afternoon, so you just need to update it.
It might not work entirely though, because I left a file aside until my next push (ManagePlugins.php has the same bugs as Subs-Plugins.php). I'm going to test my new GitHub plugin, see, and I want to have something to commit to be sure... :P
Title: Re: [Plugin] Facebook for Wedge
Post by: madfitz on February 5th, 2014, 11:00 PM
I believe it was the latest version but I'll wait it out for a working version. Thanks :)
Title: Re: [Plugin] Facebook for Wedge
Post by: Nao on February 6th, 2014, 12:44 AM
It was definitely pushed this afternoon. ;)

The last push (from a couple minutes ago) fixes the same bug in the plugin homepage. Should be all good, now. Keep me posted.

I'm late for bed by over an hour... Sleepy time is important. It keeps Nao in shape for the next day of work.
Title: Re: [Plugin] Facebook for Wedge
Post by: madfitz on February 6th, 2014, 02:04 PM
It was the afternoon when I downloaded/installed/tested it (not that it's important now).

But, I've just downloaded the latest version and get the exact same errors when activating the plugin?
Title: Re: [Plugin] Facebook for Wedge
Post by: Nao on February 6th, 2014, 02:30 PM
Well, I'm not... At any rate, try to 'Purge cache' in your admin menu. Make sure Subs-Plugins.php and ManagePlugins.php are both replaced in /core/app, too.

This error message shouldn't prevent you from using the plugin I believe, it's just a silly typo from Pete back in the day, in the code that checks whether some required functions are present.
Title: Re: [Plugin] Facebook for Wedge
Post by: madfitz on February 14th, 2014, 11:09 AM
Question: If I "login with Facebook" it will create a new user. Can this plugin (or Wedge) associate the Facebook account with a current user?
Title: Re: [Plugin] Facebook for Wedge
Post by: Nao on February 14th, 2014, 11:17 AM
No, I don't think it can. But as I said, this plugin is a bit underwhelming in practice. It needs to be tweaked to allow for password-less accounts, and skip the permission requests on Facebook itself. Associating with an existing account would make sense, too.

Unfortunately, my priority isn't on Facebook bridges. This plugin is here for that, but someone else will have to improve it (@Dragooon doesn't seem to want to do it..?), or I'll deal with it... In a few months, I guess, when the rest of Wedge no longer needs work.
Title: Re: [Plugin] Facebook for Wedge
Post by: MultiformeIngegno on February 14th, 2014, 03:15 PM
Yeah accounts liking would be good. Of course not a priority though
Title: Re: [Plugin] Facebook for Wedge
Post by: madfitz on February 14th, 2014, 05:14 PM
I appreciate Wedge needs to come first but when anybody can look at this plugin I believe account synchronisation is essential. Why would an existing user with many posts want to re-register as a 'facebook' user? They would then have two different accounts for one member :-/
Title: Re: [Plugin] Facebook for Wedge
Post by: Dragooon on February 16th, 2014, 10:57 AM
Go to Profile -> Facebook and link your account there.
Title: Re: [Plugin] Facebook for Wedge
Post by: madfitz on February 16th, 2014, 12:57 PM
Thank you Dragooon! That works exactly as expected/required :cool:
Title: Re: [Plugin] Facebook for Wedge
Post by: Nao on February 16th, 2014, 02:45 PM
Yay! Dragooon is out of lurk mode! Welcome back!
Title: Re: [Plugin] Facebook for Wedge
Post by: Pandos on February 16th, 2014, 03:01 PM
There's an error when login with facebook.
CLick on Cancel and you'll get the following:
Fatal error: Uncaught OAuthException: An active access token must be used to query information about the current user. thrown in /wedge/plugins/facebook/base_facebook.php on line 1032
Title: Re: [Plugin] Facebook for Wedge
Post by: Dragooon on February 16th, 2014, 04:00 PM
Quote from Nao on February 16th, 2014, 02:45 PM
Yay! Dragooon is out of lurk mode! Welcome back!
Thanks, college and job has kept me busy but I do read and lurk around here often.
Quote from Pandos on February 16th, 2014, 03:01 PM
There's an error when login with facebook.
CLick on Cancel and you'll get the following:
Fatal error: Uncaught OAuthException: An active access token must be used to query information about the current user. thrown in /wedge/plugins/facebook/base_facebook.php on line 1032
Does it happen on new or existing account? Is the account auth'd recently or was sync'd with facebook a while back?
Title: Re: [Plugin] Facebook for Wedge
Post by: Pandos on February 16th, 2014, 04:17 PM
Strange...
now if you clicking on "Login with facebook" you'll get redirected correctly.
Right before it's just displayed as a popup.
It's all OK now.
Title: Re: [Plugin] Facebook for Wedge
Post by: Nao on February 16th, 2014, 05:19 PM
Quote from Dragooon on February 16th, 2014, 04:00 PM
Quote from Nao on February 16th, 2014, 02:45 PM
Yay! Dragooon is out of lurk mode! Welcome back!
Thanks, college and job has kept me busy but I do read and lurk around here often.
I know; I never bothered you with that, knew you were busy IRL.
:)
Title: Re: [Plugin] Facebook for Wedge
Post by: Nao on February 19th, 2014, 11:53 PM
Quote from Pandos on February 16th, 2014, 04:17 PM
Strange...
now if you clicking on "Login with facebook" you'll get redirected correctly.
Right before it's just displayed as a popup.
It's all OK now.
It's probably a Facebook bug.

See a similar report...
http://stackoverflow.com/questions/13744673/facebook-php-sdk-misbehaving-after-december-12-updates

Or, maybe the file needs to be updated with the latest SDK version, I don't know.
Didn't have that bug myself.
Title: Re: [Plugin] Facebook for Wedge
Post by: Kian on April 8th, 2014, 05:58 PM
Quote from Nao on February 14th, 2014, 11:17 AM
Associating with an existing account would make sense, too.
OK then, I guess it is not yet possible, I was trying very hard to find how to do this on my beta forum :^^;:
Title: Re: [Plugin] Facebook for Wedge
Post by: Nao on April 8th, 2014, 09:18 PM
Didn't we we establish earlier that it was indeed possible..? By visiting the Facebook link on your profile menu.
Title: Re: [Plugin] Facebook for Wedge
Post by: Kian on April 8th, 2014, 10:05 PM
Quote from Nao on April 8th, 2014, 09:18 PM
Didn't we we establish earlier that it was indeed possible..? By visiting the Facebook link on your profile menu.
I see the Facebook link under Profile in Wedge.org but not in my forum unfortunately.
When I try to cheat by modifying my URL with http://beta.potesnroll.com/do/profile/?area=facebook it still wont appear, dont know why.

My log says
Code: [Select]
Unable to load the "(Wedge:Facebook) plugin.french" language file.
while I'm using the forum in English.
Title: Re: [Plugin] Facebook for Wedge
Post by: Pandos on April 8th, 2014, 10:06 PM
Did you enable this plugin in admin?
Title: Re: [Plugin] Facebook for Wedge
Post by: Kian on April 8th, 2014, 10:09 PM
Quote from Pandos on April 8th, 2014, 10:06 PM
Did you enable this plugin in admin?
Yes and it seems to work for new members though I cant test it completely because I only have one Facebook account and dont want to link it to a test account ^^

Edit : it seems that my plugins are in French and the reste of the forum in English.
Perhaps I should add the French language to the forum.

Edit 2 : Well, I added French, chose it from the menu but the forum language wont change. I'll try again tomorrow.
Title: Re: [Plugin] Facebook for Wedge
Post by: Nao on April 8th, 2014, 11:40 PM
Don't forget to click Admin > Purge cache (Effacer le cache), from time to time...
I'm not sure what's wrong, though. I don't think there's a toggle to check, apart from the actual plugin enabler.

PS : ehhh, j'ai reçu une relance de la BNF... Wouhou... -_-
Title: Re: [Plugin] Facebook for Wedge
Post by: Kian on April 9th, 2014, 01:00 AM
Quote from Nao on April 8th, 2014, 11:40 PM
Don't forget to click Admin > Purge cache (Effacer le cache), from time to time...
I'm not sure what's wrong, though. I don't think there's a toggle to check, apart from the actual plugin enabler.
I did not forget to click it, nothing changed.
Quote
PS : ehhh, j'ai reçu une relance de la BNF... Wouhou... -_-
J'ai un recommandé à aller chercher, je suppose que c'est lié...
Title: Re: [Plugin] Facebook for Wedge
Post by: Kian on April 9th, 2014, 03:31 PM
I tried to deactivate then reactivate the Facebook plugin. Still the same, no Facebook entry under profile (in French and English)
Nothing more in the error log.

Nothing in the Apache error log.

And the Apache access log has nothing of interest :

Code: [Select]
217.174.xxx.yyy - - [09/Apr/2014:15:40:33 +0200] "GET /do/profile/?area=facebook HTTP/1.1" 200 6509 "http://wedge.org/pub/plugins/7274/plugin-facebook-for-wedge/msg295430/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0"
217.174.xxx.yyy - - [09/Apr/2014:15:40:34 +0200] "GET /gz/css/Wilde/firefox29-admin-869713.css.gz HTTP/1.1" 200 25201 "http://beta.potesnroll.com/do/profile/?area=facebook" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0"
217.174.xxx.yyy - - [09/Apr/2014:15:40:34 +0200] "GET /gz/css/Wilde-mana/firefox29-869713.css.gz HTTP/1.1" 200 5855 "http://beta.potesnroll.com/do/profile/?area=facebook" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0"
217.174.xxx.yyy - - [09/Apr/2014:15:40:34 +0200] "GET /gz/js/profile-m-869713.js.gz HTTP/1.1" 304 - "http://beta.potesnroll.com/do/profile/?area=facebook" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0"
Title: Re: [Plugin] Facebook for Wedge
Post by: Kris on September 7th, 2014, 08:55 AM
Gentlemen
@Dragooon, @Pandos, @Nao
does this facebook plugin work with FB API 2?

I am trying wedge to check features and if I have my key required features (core or via plugin) to choose this over SMF. I created an FB App. When I try to login using FB ID, it takes me past the FB login but returns a blank page instead of coming back to the forum. Also, even if I come back to the forum by typing the URL, I am not logged in.

Please suggest...
Title: Re: [Plugin] Facebook for Wedge
Post by: Kian on September 11th, 2014, 10:39 PM
I never managed to get this plugin to work on my forum. However it seems to work perfectly on Wedge.org, I always logon with the Facebook button. Don't know...
Title: Re: [Plugin] Facebook for Wedge
Post by: Kris on September 14th, 2014, 04:37 AM
@kian
In exactly same situation as you are. Hope some good guys  an show us the way out.
Title: Re: [Plugin] Facebook for Wedge
Post by: subram on October 3rd, 2014, 02:15 PM
I'm having the same problem.

Code: [Select]
http://elektronark.org/do/admin/?area=facebook
Apply Filter: Only show the errors with the same message "(Wedge:Facebook) plugin.turkish" dil dosyası yüklenemiyor.