Advertisement:

Author Topic: SA Facebook Integration  (Read 1036225 times)

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,916
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #460 on: June 12, 2010, 10:22:31 AM »
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.

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #461 on: June 12, 2010, 11:13:43 AM »
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
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline William L

  • Jr. Member
  • **
  • Posts: 189
  • Gender: Male
    • HiMSI - UBM
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #462 on: June 12, 2010, 11:36:01 AM »
hmmm.....
I`m Trying to use this mod at localhost, but i have erro...

Quote
Invalid 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]

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #463 on: June 12, 2010, 03:47:45 PM »
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
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline daked

  • Jr. Member
  • **
  • Posts: 175
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #464 on: June 13, 2010, 12:59:34 AM »
There’s an error that shows up if you try logging in with f.bconnect
   
   
Quote
An 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
« Last Edit: June 13, 2010, 10:27:28 AM by daked »

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #465 on: June 13, 2010, 04:02:18 PM »
whats your facebook app settings?
http://samods.github.io/SAChatBar/

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

Offline Abel6669

  • Semi-Newbie
  • *
  • Posts: 37
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #466 on: June 14, 2010, 09:34:52 AM »
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

Offline shinnok

  • Semi-Newbie
  • *
  • Posts: 22
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #467 on: June 14, 2010, 12:13:27 PM »
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 (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/# (or yoursite.com#, 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()   )

Code: [Select]
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

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #468 on: June 14, 2010, 05:51:38 PM »
@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
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline shinnok

  • Semi-Newbie
  • *
  • Posts: 22
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #469 on: June 15, 2010, 03:28:12 AM »
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?
« Last Edit: June 15, 2010, 05:33:57 AM by shinnok »

Offline coolfx350

  • Jr. Member
  • **
  • Posts: 142
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #470 on: June 15, 2010, 06:11:00 AM »
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.
« Last Edit: June 16, 2010, 06:06:39 AM by petecheng »

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #471 on: June 15, 2010, 12:53:47 PM »
@shinnok then your have todo the edits to your custom theme

@petecheng you can try in fbc/fbconnect.js

find

Code: [Select]
document.getElementById("comments").innerHTML = "<fb:comments xid=" + mod_settings_fb_com_xid + " numposts=" + mod_settings_fb_com_show + "></fb:comments>";
and chnage to    
Code: [Select]
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
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline shinnok

  • Semi-Newbie
  • *
  • Posts: 22
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #472 on: June 16, 2010, 03:12:20 AM »
@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
« Last Edit: June 16, 2010, 04:23:24 AM by shinnok »

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,916
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #473 on: June 16, 2010, 05:53:42 AM »
@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.

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #474 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
http://samods.github.io/SAChatBar/

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

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,916
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #475 on: June 16, 2010, 03:11:53 PM »
dont forget that some custom themes will fail nothing we can do about that it is just cos ther not default
agreed...

Offline luckyMM

  • Newbie
  • *
  • Posts: 9
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #476 on: June 16, 2010, 11:47:06 PM »
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

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #477 on: June 17, 2010, 05:45:20 PM »
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
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Offline Tearstar

  • Semi-Newbie
  • *
  • Posts: 29
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #478 on: June 17, 2010, 07:25:06 PM »
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?

Offline SA™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,954
  • (T)ogether (E)veryone (A)chieves (M)ore
    • DenotsNiaga on Facebook
    • SAChatBar
Re: SA Facebook Connect Integration [now supports smf1 and smf2]
« Reply #479 on: June 18, 2010, 09:01:07 PM »
this still uses the old rest api for now

this should work for you

Code: [Select]
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
Quote
My allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-