News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

SA Facebook Integration

Started by SMFHacks.com Team, February 12, 2010, 01:36:11 PM

Previous topic - Next topic

Skyflash

Quote from: distante on March 07, 2012, 04:45:33 PM
I can't find the way to link, because, if I click in the name, it take's me to a new created page. And If a Click the X button, just erase that page, and show me a "create a page" buttom, and then it create a new one... it's an infinite loop!
Ummmh... probably i'm telling something wrong, but... your page is updated to the new journal, or has the old style?
My page (created BEFORE the link; i've made the link this morning, but the page was created last week) has the new journal style, and i'm sure it's linked to the app

distante

My page have a month or so, and I don't have the new layout yet... that could be the reason?

SA™

http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

distante

Thanks, I changed the name of my fan page to the same as my app (desadaptados.net), my facebook page name (the one in ww.face/blalbal is different but I think this doesn't matter, don't?)

Now wait until facebook ask me for the migration, thank you SA!

distante

SA, the bbc tags are been cleanead in the mod before send the post content to facebook?

SA™

yes they should be removed before going to fb
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

nfh

Quote from: SA™ on March 04, 2012, 02:20:37 AM
Quote from: nfh on March 04, 2012, 01:30:53 AM
Hi,
I just finished setting up a website using SMF for the first time. I also installed this SA Facebook Integration addon, hoping to get a seamless integration between Facebook and my forum.

I thought that the "Connect with Facebook" provided a straightforward way to use Facebook authentication for loggin in on the SMF site. Nonetheless, when I click on the "Connect with Facebook" button, after complying with the agreement text, I'm redirected to a registration form which has my username set as "firstname.lastname" and two fields for a password (password + confirmation).

Wasn't is suppose to logon imediately? Or is this registration procedure really necessary while using Connect with Facebook?

Best regards.

what you see if the first register if you ajint synces to fb you only see that part once

I'm sorry, but I didn't fully understand what you mean... is that registration step normal? Or am I doing something wrong?
Do you have any live demo of a SMF forum where you're using this plugin for registering, so that I can check out how it is supposed to work?

distante

Hey SA™!

I have a problem with the login,

see, The mod is working fine, BUT since I use Pretty URLs, for some reason, when I login with FB instead of keeping me in the same place, after I log the mod is kicking me out to the index...

Any Ideas what can I do?


Also, Im using The ILA mod (in Line Attachemenst) and it use a code like [attach=1] (for the 1st attach) and this isn't filtered when I share a post in facebook.


Thanks!

SA™

@nfh http://www.sa-smf.com/ you can try it there
what you see there you only see once when registering via fb

@distante
Quotesee, The mod is working fine, BUT since I use Pretty URLs, for some reason, when I login with FB instead of keeping me in the same place, after I log the mod is kicking me out to the index...
have you tryed to disbale purls for the fb mod mod?

QuoteAlso, Im using The ILA mod (in Line Attachemenst) and it use a code like [attach=1] (for the 1st attach) and this isn't filtered when I share a post in facebook.

not sure yet have to look into this one
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Skyflash

Quote from: SA™ on March 08, 2012, 03:37:30 PM
QuoteAlso, Im using The ILA mod (in Line Attachemenst) and it use a code like [attach=1] (for the 1st attach) and this isn't filtered when I share a post in facebook.
not sure yet have to look into this one
I confirm, @distante is right :)
I'm using ILA too, and the "problem" is the same. Look

distante

@LA ™
Quote from: SA™ on March 08, 2012, 03:37:30 PM
@distante
Quotesee, The mod is working fine, BUT since I use Pretty URLs, for some reason, when I login with FB instead of keeping me in the same place, after I log the mod is kicking me out to the index...
have you tryed to disbale purls for the fb mod mod?

I tryied now, skipping the facebook action, but still kicks me to the index, exactly to: http://www.desadaptados.net/#_=_

There's another action involved in the login process?

SA™

yes theres two actions facebookintegrate and facebook
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

distante

Nothing, I added
facebook,facebookintegrate
And nothing :(

distante

* distante messing around with the code.

So far, I find that this lines where the redirect path is config in the FacebookIntegrate.php file


if (empty($_SESSION['login_url']) && isset($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'dlattach') === false && preg_match('~(board|topic)[=,]~', $_SESSION['old_url']) != 0)

$_SESSION['login_url'] = $_SESSION['old_url'];


* distante obsessed with find the solution

Let's see,  there you are checking for the board|topic strings, but since I use PrettyUrls, I don't have board/topic info, so i used part of code that I used in my (very simple, awful but yet useful) mod: Remember Position After Login/Logout, and change a little bit the way that SA Facebook obtain the login_url


//distante's modification for SA Facebook correct redirect in www.desadaptados.nets
  if (!empty($_SERVER['HTTP_REFERER'])) // The server Nows where I am!
{
$_SESSION['old_url'] = $_SERVER['HTTP_REFERER']; // Tell to SA Facebook Mod, where I am!!
}
 
        //if (empty($_SESSION['login_url']) && isset($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'dlattach') === false && preg_match('~(board|topic)[=,]~', $_SESSION['old_url']) != 0)

// Now I don't Need to check for board|topic preg_match
if (empty($_SESSION['login_url']) && isset($_SESSION['old_url'])$)

        $_SESSION['login_url'] = $_SESSION['old_url'];


Works with or without PrettyUrls enable and no need to disable prettyUrls of facebook actions for login.





* distante banging his head against the table

Now I have the problem that, If I clic "login with facebook" and I'm not Log in facebook yet (so I the SA Face mod sends me to facebook to login) when I log into facebook and return to the forum, It kick's me to the index!!!

I can't find the way to fix this.

nfh

#2374
Now I ran onto another problem: I have one board on my forum that has permissions enabled for publishing, likes and comments. Nonetheless, when someone posts a new topic on that board, the plugin doesn't post on my Facebook as expected.
I have the Facebook app authorized on my profile and I have the proper Facebook Page ID configured on the Publisher settings page. Furthermore, it already functioned properly, but for some reason it stopped working (I didn't do anything special with my forum). It had already happen before, but I solved it by unauthorizing the Facebook App on my Facebook profile and reauthorizing it through the Facebook Integration admin panel.

I am aware that this might be a shot in the dark for you, but I suppose that someone else already had this problem before. Any suggestion of what might be causing this?

EDIT: after some fiddling, I got it to work again. I didn't do anything special, I just unauthorized it on my Facebook, authorized it again on SMF and that's it. Nonetheless, that's strange.

netpaydays

I am constantly getting this error:
You Are not Connected With Facebook!

--------------------------------------------------------------------------------
Integrate forum account with Facebook.

anything i can do about that?

distante

* distante bothering again

When I publish a comment that have an IMG tag, the tag is stripped but the image doesn't get showed in FA.

SA™

@nfh
yeah this happens from time to time not sure why but reauthorisaation usaly does the trick

@netpaydays
yep im aware of this error it should be fixed in the next version

@distante
yes that how it supposed to work it removes bbc tags and anything inside them

http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

distante

oh, and never shows any pic when I post "publish to fb" ?

also did you looked here? : http://www.simplemachines.org/community/index.php?topic=365503.msg3289933#msg3289933

distante

After the fix for the UTF-8 content in the post I was having a problem with The titles


So I was messing around with the code, and add a simple function in the file FacebookHooks.php
Code (Find) Select

$context['fb_publish_subject'] = $cleaned[0]['subject'];


Code (Replace) Select
$context['fb_publish_subject'] = html_entity_decode($cleaned[0]['subject']);


Result :


Now I'm still on the search of
  • How to remember my log position when the forum send me to FB to log in order to log in the forum.
  • How to publish posts where I have pictures added, with [nobb][img][/nobbc] tag or [attach] tag (of the ILA mod)

Advertisement: