News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SA Facebook Integration

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

Previous topic - Next topic

Hj Ahmad Rasyid Hj Ismail

Quote from: Sleepy Arcade on June 11, 2010, 11:31:06 PM
in index.template.php find

http://b.static.ak.fbcdn.net/rsrc.php/zB6N8/hash/4li2k73z.gif

and chnage it to you image that you wat to use
Thanks a million. Very kind of you to show me the right path to it. Will be changing it soon. Thanks again.

SA™

yw im just getting back into things myself with modding
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 -___-

William L

hmmm.....
I`m Trying to use this mod at localhost, but i have erro...

QuoteInvalid API key specified


The application you are trying to access does not exist or has been disabled.

How to solve this problem ?
Mods:
1. Spoiler BBCODE v1.1.1 [Topic  || Download]
2. Yahoo Messenger BBCODE v1.1.1 [Topic  || Download]

SA™

did you setup an app on facebook? you need todo so to get an api key
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 -___-

daked

There's an error that shows up if you try logging in with f.bconnect
   
   
QuoteAn error occurred with Ngn Media Connect. Please try again later.

API Error Code: 100
API Error Description: Invalid parameter
Error Message: next is not owned by the application.

what do i do

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 -___-

Abel6669

I'm still having this problem...


Fatal error: Class 'Facebook' not found in /home/a8298844/public_html/Sources/FB_Connect/FB_Connect_Subs.php on line 359


when i click "intergrate with facebook".

now, the code that its refering to is:

include_once $boarddir.'/fbc/facebook/php/facebook.php';
$api_key = ''.$modSettings['fb_app_key'].'';
$secret  = ''.$modSettings['fb_app_secret'].'';
$fb = new Facebook ($api_key,$secret);
$fb_user = $fb->get_loggedin_user();
$user_id = $fb->require_login();

its not my fault, as its your code..buty i don't know what I have to do to fix it...so i leave it with you :).

Forum v.2.0 RC3

shinnok

Hi all,
i installed this mod, i created the application on Facebook and used the key etc, but when i press on the button to connect with fb account, instead of doing it, the page doesn't load anything, like if i'm not pressing anything and after the address a "#" appears.
Like this:

1) w.ww.yoursite.com [nofollow] (random name)
2) i click "Fb connect", nothing happens
3) i stay with the cursor on the button and i see that it sends me to w.ww.yoursite.com/ [nofollow]# (or yoursite.com [nofollow]#, don't remember now)

What's missing? I have to modify the code of my template?
Before this i had another error:

Fatal error: Call to undefined function show_facebook() in /xxxxxxxxxx/public_html/penpal-community/Sources/PortalBlocks.php on line 225

So i checked online and i found a guy that made a code to modify the template and i used that. After that, all seemed ok but instead nothing works.

This is the code i added, in index.template.php   (before the line -->    function template_body_above()   )

function show_facebook()
{
global $boardurl, $settings, $context, $txt, $modSettings, $scripturl;
if($modSettings['fb_enable'])
{
if ($context['user']['is_logged'])
{    
if(isset($context['user']['fb'])) {
echo '<img src="' . $settings['images_url'] . '/facebook.png" alt="'.$txt['fb_title'].'" /> <a href="#" onclick="javascript:fbLogincheck(); return false;">'.$txt['fb_title'].'</a>';
}
else {
echo ' <img src="' . $settings['images_url'] . '/facebook.png" alt="'.$txt['fb_title'].'" /> <a href="#" onclick="javascript:fbLoginsync(); return false;">'.$txt['fb_integrate'].'</a>';
}
echo'<br /><br />';
}
else
{
echo'
<a href="#" onclick="javascript:fbLogin(); return false;"><img src="http://b.static.ak.fbcdn.net/rsrc.php/zB6N8/hash/4li2k73z.gif" alt="" /></a>';
}
}
}


Probably is wrong, but since i'm a noob.... anyone can help me? Thanks

SA™

@Abel6669  if you login to your server and see if the fbc dir is there pleasde if it is what are the permissions set to files should be 644 folders should be 755

@shinnok  same as above whats permission on fbc/fbconnect.js should be 644
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 -___-

shinnok

Yes, the folder is there with permission 755 and the file has 644. I tried to re-install all again, but nothing works ;(

Maybe it's about the FB application i created? What i have to do exactly there? I just need the key/secret key or i have to configure all?

P.S.  i forgot to say, i don't use the default theme (Curve something) i'm using another one, called Impulse2.
I saw that with the default theme it works, but with the one i chose it doesn't. What i have to modify?

coolfx350

Thanks for the wonderful mod, there's one small issue for me..
my forum background is gray, the facebook comment text is black, so it's very hard to read.

see attached screenshot.

is there a way to change the background to white? where to make the change? thx.

SA™

@shinnok then your have todo the edits to your custom theme

@petecheng you can try in fbc/fbconnect.js

find

document.getElementById("comments").innerHTML = "<fb:comments xid=" + mod_settings_fb_com_xid + " numposts=" + mod_settings_fb_com_show + "></fb:comments>";

and chnage to    

document.getElementById("comments").innerHTML = "<fb:comments xid=" + mod_settings_fb_com_xid + " numposts=" + mod_settings_fb_com_show + " css='http://www.yourwebsite.com/css/comments.css?1234'></fb:comments>";


then chnage http://www.yourwebsite.com/css/comments.css?1234 to your themes.css


http://wiki.developers.facebook.com/index.php/Fb:comments_(XFBML)
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 -___-

shinnok

Quote from: Sleepy Arcade on June 15, 2010, 12:53:47 PM
@shinnok then your have todo the edits to your custom theme


Now it seems to work, but something happened. I uninstalled and installed the mod again, choosing my theme too. But when SMF checks if the installation will be ok, it tells me:

template.index.php   Test Failed

In about 3-4 lines it tells me it fails. I tried anyway but then i see that if a new user tries to use Connect at some point it says "You must be logged in Facebook etc etc" even if he/she's logged.
Mah  :o

Hj Ahmad Rasyid Hj Ismail

Quote from: shinnok on June 16, 2010, 03:12:20 AM
Quote from: Sleepy Arcade on June 15, 2010, 12:53:47 PM
@shinnok then your have todo the edits to your custom theme


Now it seems to work, but something happened. I uninstalled and installed the mod again, choosing my theme too. But when SMF checks if the installation will be ok, it tells me:

template.index.php   Test Failed

In about 3-4 lines it tells me it fails. I tried anyway but then i see that if a new user tries to use Connect at some point it says "You must be logged in Facebook etc etc" even if he/she's logged.
Mah  :o
My guess is you dont have a clean uninstall. Manually restore the file by removing the modified line and replacing it with the previous one and try again. If it still fail to have a clean install, manually modify the respected file it fails to modify.

SA™

dont forget that some custom themes will fail nothing we can do about that it is just cos ther not default
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 -___-

Hj Ahmad Rasyid Hj Ismail

Quote from: Sleepy Arcade on June 16, 2010, 01:53:58 PM
dont forget that some custom themes will fail nothing we can do about that it is just cos ther not default
agreed...

luckyMM

Hi SA
First of all, i would like to say Thank You for your amazing this mod.

And i have a question. To use this mod , do i need to enable Guest permission? If i disabled Guest permission of forum, this mod will not work. Right?
How can i use this mod without giving guest permission?

I'm using SMF 2.0 RC3

Rgds,
luckyMM

SA™

yes you do i dont know a way around it yet if there is one that is
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 -___-

Tearstar

Is this currently based off the OpenGraph Facebook system? If not are there plans to adap it to the OpenGraph system? Not that it will make a difference in functionality, but for consistancy on my site, was curious.

Also I am using SSI.php to use the login/logout outside of the forums and I can't seem to figure out how to include the facebook connect stuff to the login bloack I have.

http://oge.sytes.net

Under members tab, under the login block . . . I want (Connect with Facebook) so a user can use facebook to login.
any ideas?

SA™

this still uses the old rest api for now

this should work for you


show_facebook();
function show_facebook()
{
    global $settings, $user_info, $context, $txt, $modSettings;

    if ($context['user']['is_logged'] && !empty($modSettings['fb_enable']))
    {
        if (!empty($user_info['fbname']))
            echo '<img src="' . $settings['images_url'] . '/facebook.png" alt="'.$txt['fb_title'].'" /> <a href="#" onclick="javascript:fbLogincheck(); return false;">'.$txt['fb_title'].'</a>';
        else
            echo ' <img src="' . $settings['images_url'] . '/facebook.png" alt="'.$txt['fb_title'].'" /> <a href="#" onclick="javascript:fbLoginsync(); return false;">'.$txt['fb_integrate'].'</a>';
   
        echo'<br /><br />';
    }
    elseif (!empty($modSettings['fb_enable']))
        echo'<a href="#" onclick="javascript:fbLogin(); return false;"><img src="http://b.static.ak.fbcdn.net/rsrc.php/zB6N8/hash/4li2k73z.gif" alt="" /></a>';
}


you may also need this
echo'<script src="path to fbc dir/fbc/fbconnect.js" type="text/javascript"></script>';

just change the part in red

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 -___-

Advertisement: