SA Facebook Integration

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

Previous topic - Next topic

mursalat

firstly gotta say: REAL Awesome Stuff..  ;D - u saved me hours of work brav..
so i setup this thing, put in my API secret, API Key, and the ID, and all worked fine, i got asked for permission stuff when trying to integrate my facebook account... i authorized it, but after that when i click on "Integrate with Facebook" I get something like what you see on the screenshot, (basically nothing happens, just the page refreshes after showin the FB dialog as shown on the screenshot)..

So looking at the source, i saw the link is something like:
<a href="" onclick="fbLogincheck();">Integrate with facebook</a>

So whats it supposed to do after checkin login
I got no idea where its going wrong...

SA™

it should redirect to action=facebook after you autherise it keep trying somtimes facebook gos like this unfortuantly it is out of my control
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 -___-

mursalat

I have been trying since yesterday, thats why i decided to post for help now.. i finally gave up..
Actually is there anything other then the Connect URL/base domain then i need to setup at Facebook? a url facebook will ping?

SA™

did you set and email domain? can have a link to your site please?
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 -___-

mursalat

yeah sure, its studentforums.biz [nofollow]

and what do you mean by if i setup a email domain??

I just wanted to tell you that i just manually put up the link such that its not a href="#" but a href="?action=facebook"

SA™

yes that will work like that but if your not logged in fb and goto action=facebook it wll throw erros

it is working for me i just registerd at your site with facebook connect
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 -___-

mursalat

uh oh, ok,
sorry - i guess i should have created another fb account to test it...

Thnx for the help... and also GREAT MOD!

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

mursalat

Just another thing - did you have any problems after logging in?
what happens when you click facebook connect? thnx brav

SA™

nope none at all when you click facebook conenct you get the facebook popup after that it redirect to action=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 -___-

mursalat

thats awesome brav..
U r awesomeInfinite
:D
Thanks - btw, sorry for a lil late reply, went downstairs to eat  ;D

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

mursalat

awesome - since you saved me, i will be ur slave for the next .5 hour, then i gotta go outside,

Anyway, here is my lil contribution:

some of you guys dont like the way the share button comes just above the Topic, you can fix it by going to Themes/default/Display.template.php
then instead of
adding:

';
if ($context['show_fb_share_button']){
   echo'<script type="text/javascript">
           var mod_settings_fb_share = "',$context['current_topic'],'";
            </script>
        <span id="share"></span>
        <script type="text/javascript">
            Get_share();
            </script>
                <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>';
}
   echo'


after
<tr class="catbg3">

Do this:
replace

', $txt[118], ': ', $context['subject'], ' &nbsp;(', $txt[641], ' ', $context['num_views'], ' ', $txt[642], ')
</td>

with:

';
if ($context['show_fb_share_button']){
   echo'<script type="text/javascript">
           var mod_settings_fb_share = "',$context['current_topic'],'";
            </script>
        <span id="share"></span>
        <script type="text/javascript">
            Get_share();
            </script>
                <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>';
}
echo
$txt[118], ': ', $context['subject'], ' &nbsp;(', $txt[641], ' ', $context['num_views'], ' ', $txt[642], ')
</td>

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

bahgheera

@SleepyArcade - do you have a response for my post back on page 23? About people logging in as admin due to this plugin?

SA™

no cos i cannot replicate this the only i think that can happen is if they have the same name as the admin on facebook but i doubt it considering each facebook id is unick to that user

i logs the user in using the  id so if you was john smith clikc the facebook connect button it will look for the the user id from facebook the search the members table for that id then it will do the login stuff
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 -___-

MATTEK

Does this mod conflict with any other facebooks mods? I'm trying to install and it says it's corrupt or incompatible with my version of SMF.
SMF 2.0.1

Like Comics, Books, Movies or T.V. Shows? Read about them here!!

Hj Ahmad Rasyid Hj Ismail

Quote from: MATTEK on June 21, 2010, 03:27:01 AM
Does this mod conflict with any other facebooks mods? I'm trying to install and it says it's corrupt or incompatible with my version of SMF.
I've been using this mod for quite some times now and it's awesome. And yes, from my past experience it does conflict with other facebook mods (which you do not need with this mod installed). And normally, I use mod page to download the mod, upload it back to my forum and install it there; as sometimes directly download and install from Package Server [Simple Machines Third-party Mod Site] cause me problems like yours (" it's corrupt or incompatible").

JonoJames

I'm trying to get FB Connect mod to work with external pages from the forum, i tried the code you gave at the top but got an error from load.php when saying that show_facebook(); was already defined.

Any ideas how to get this working?

SA™

try this one

show_facebook_ext();
function show_facebook_ext()
{
    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>';
}
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: