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

wole8029

hello please i need help, i have installed the facebook mod, successfully and other facebook features work well, except facebook, connect, i think its the apps i created, the new process of creating the apps is different from the one in the first post..i have tried evrytin for the past two weeks and i kip etter facebook app error..please i need omeone to help create a facebbok app for me..please please...


cookiesandcream

#2422
Quote from: joelstoner on March 13, 2012, 10:22:06 PM
Ok i have it installed again, but i see no difference on the forum, even after clearing the cache. Do i have to run install.php? If so where should it be during the install, packages, or root?

I'm having the exact same problem (smf 2.02 / v55). It looks like it's not installing the files (since there is nothing in the sources/themes folder related to Facebook, and from looking at other people's comments/log it seems like there should be?) I'm not getting any error messages when I install it, so it's difficult to know where it's going wrong?

wole8029

Quote from: distante on March 14, 2012, 02:57:44 AM
http://www.sa-smf.com/community/index.php?action=kb;area=article;cont=41

@smf hero thanx for your reply, but i have tried that and it didnt work, it kips givn me an error.. i need someone to help me create the app on my fbook account. i will give you my usernm and passwd...please

distante

I can help you with that but, in the night (my night) about 9pm (GMT -5)

distante

#2425
If I'm correct, this is the code that takes and strip the BBC codes from the post:

//grab the first img in the post
if (preg_match_all('~(\[img.*?\])(.+?)\[/img\]~eis', $msgOptions['body'], $matches)){
    foreach ($matches as $val) {
        $val[0] = str_replace('[img]','',$val[0]);
$val[0] = str_replace('[/img]','',$val[0]);
$context['fb_pub_img'] = $val[0];
$context['body_rid_img'] = preg_replace('~(\[img.*?\])(.+?)\[/img\]~eis','',$msgOptions['body']);
    }
}
else{//no img use the post icon
    $context['fb_pub_img'] = $settings['default_images_url'] . '/post/' . $msgOptions['icon'] . '.gif';
$context['body_rid_img'] = $msgOptions['body'];
}


don't?

Since I'm using ILA, I have a bbc code like this [Attach=1]  with no closing, and that is calling to my attach image in the post, how can I obtain that Image so the Publisher don't write "[attach=1] bla bla bla[/b] but just [bla bla bla] and get the image for FB?

I added this $context['body_rid_img'] = preg_replace('~(\[att.*?\])','',$context['body_rid_img']);
to the end of the first IF for cleaned the body, but I'm not sure if that ok (i'm really bad with regular expressions).

Also, if that works, there's no url in the bbc, because that mod shows the img when the html is converted... so, I'm stuck

!RFAN

how to add comment box in aeva media for individual items?

trekkie2444

Still getting this error...

Guest
72.30.161.249   
    Today at 01:18:25 AM
2a80a29f34e60522ea4ea1d229e36e3e
Type of error: Critical
http://e-p1.net/index.php?action=facebookintegrate;area=connectlog
The database value you're trying to insert does not exist: mem
Function: face_USettingsFile: [...]Facebook/FacebookHooks.php
Line: 876

joelstoner

Thank you to everyone who tried to help me, i was able to install this by switching my forum to a better host. One quick question, is there a way to hide the facebook profile link from guests?

distante

The profile link is a Custom Profile Field, you can set te permission for it in the admin panel (search profile and the link will appear, I don't remember the direct route now)

joelstoner

I found it, for those who have the same issue here is how to keep guests from seeing member's facebook links.
Admin->Permissions->Click modify on the Guests selection->Uncheck "View other people's profiles"->Save Changes

nfh

Quote from: SA™ on March 09, 2012, 06:18:59 PM
@nfh
yeah this happens from time to time not sure why but reauthorisaation usaly does the trick
[...]

Did you find the source for this problem? I reauthorized the app yesterday and it was working ok after that. Nonetheless, today automatic posts aren't working again.

It seems that the authorization lifespan is only a few hours long... at least on my forum.

distante

Quote from: nfh on March 14, 2012, 07:13:35 PM
Quote from: SA™ on March 09, 2012, 06:18:59 PM
@nfh
yeah this happens from time to time not sure why but reauthorisaation usaly does the trick
[...]

Did you find the source for this problem? I reauthorized the app yesterday and it was working ok after that. Nonetheless, today automatic posts aren't working again.

It seems that the authorization lifespan is only a few hours long... at least on my forum.

Happend to me also. Maybe is a facebook thing?

SA™

Quote from: distante on March 14, 2012, 11:08:05 AM
If I'm correct, this is the code that takes and strip the BBC codes from the post:

//grab the first img in the post
if (preg_match_all('~(\[img.*?\])(.+?)\[/img\]~eis', $msgOptions['body'], $matches)){
    foreach ($matches as $val) {
        $val[0] = str_replace('[img]','',$val[0]);
$val[0] = str_replace('[/img]','',$val[0]);
$context['fb_pub_img'] = $val[0];
$context['body_rid_img'] = preg_replace('~(\[img.*?\])(.+?)\[/img\]~eis','',$msgOptions['body']);
    }
}
else{//no img use the post icon
    $context['fb_pub_img'] = $settings['default_images_url'] . '/post/' . $msgOptions['icon'] . '.gif';
$context['body_rid_img'] = $msgOptions['body'];
}


don't?

Since I'm using ILA, I have a bbc code like this [Attach=1]  with no closing, and that is calling to my attach image in the post, how can I obtain that Image so the Publisher don't write "[attach=1] bla bla bla[/b] but just [bla bla bla] and get the image for FB?

I added this $context['body_rid_img'] = preg_replace('~(\[att.*?\])','',$context['body_rid_img']);
to the end of the first IF for cleaned the body, but I'm not sure if that ok (i'm really bad with regular expressions).

Also, if that works, there's no url in the bbc, because that mod shows the img when the html is converted... so, I'm stuck

your regex if a bit off :P

$shortened = substr($context['body_rid_img'],0,strpos($context['body_rid_img'] ," ",$length));
add after
$nobbc_body = preg_replace('~\[attach\=([0-9]+)\]~iU','',$nobbc_body);
$nobbc_body = preg_replace('~\[attachimg\=([0-9]+)\]~iU','',$nobbc_body);
$nobbc_body = preg_replace('~\[attachurl\=([0-9]+)\]~iU','',$nobbc_body);
$nobbc_body = preg_replace('~\[attachmini\=([0-9]+)\]~iU','',$nobbc_body);
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


distante

Quote
$shortened = substr($context['body_rid_img'],0,strpos($context['body_rid_img'] ," ",$length));
add after
$nobbc_body = preg_replace('~\[attach\=([0-9]+)\]~iU','',$nobbc_body);
$nobbc_body = preg_replace('~\[attachimg\=([0-9]+)\]~iU','',$nobbc_body);
$nobbc_body = preg_replace('~\[attachurl\=([0-9]+)\]~iU','',$nobbc_body);
$nobbc_body = preg_replace('~\[attachmini\=([0-9]+)\]~iU','',$nobbc_body);

Should it be the fist line:
$nobbc_body = preg_replace('~\[attach\=([0-9]+)\]~iU','',$shortened);

Because there's no $nobbc_body defined before! or must be after
$shortened = substr($context['body_rid_img'],0,strpos($context['body_rid_img'] ," ",$length));
$nobbc_body = preg_replace('|[[\/\!]*?[^\[\]]*?]|si', '', $shortened);

?

SA™

new version added

added user name to replys posted on facebook [thanks distante]
fixed issue the page *topic* can't be found with comments error [thanks distante]
publisher now removes ila tags
publishe button now uses the image specyfied in fb admin for og tags
fixed hardcoded text
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

SA™ the publish don't will be retrieve any img now? like this:



Just the main image (the one defined in the admin page? )

(off topic, that image is for a topic about a girls selling her farts in ebay :S )

nfh

Quote from: distante on March 14, 2012, 07:33:47 PM
Quote from: nfh on March 14, 2012, 07:13:35 PM
Quote from: SA™ on March 09, 2012, 06:18:59 PM
@nfh
yeah this happens from time to time not sure why but reauthorisaation usaly does the trick
[...]

Did you find the source for this problem? I reauthorized the app yesterday and it was working ok after that. Nonetheless, today automatic posts aren't working again.

It seems that the authorization lifespan is only a few hours long... at least on my forum.

Happend to me also. Maybe is a facebook thing?

Well, today it seems that even the reauthorization method isn't working. I even installed the latest version (after uninstalling the previous one), but no luck whatsoever.

I also noticed that the "Publish" link does not work as well, so this isn't specific to the automatic Facebook posting, it isn't posting to Facebook at all, no matter the method.

distante

That image in my last post was maked today, with the automatic post method.

Advertisement: