• [MOD] Facebook Connector V1.0 & V2.0 5 0 5 1
Currently:  

Author Topic: [MOD] Facebook Connector V1.0 & V2.0  (Read 244124 times)

0 Members and 1 Guest are viewing this topic.

Offline XIIIX

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: [MOD] Facebook Connector V1.0
« Reply #120 on: June 24, 2011, 02:54:28 AM »
Ok I added the code where you said I needed to add it but the Login to Facebook section disappeared.. :/
This is the code:

User-loginform
Code: [Select]
    <form action="{url_login}" method="post">
        {lang_user_name}<br />
        <input type="text" size="14" name="user_name" class="search" />
        <br />
        {lang_password}<br />
        <input type="password" size="14" name="user_password" class="search" />
        <br />
        <table border="0" cellspacing="0" cellpadding="0">
          <tr valign="top">
            <td><input type="checkbox" name="auto_login" value="1" /></td>
            <td>Remember Me?</td>
          </tr>
        </table>
        <br />
<input type="submit" value="{lang_login}" class="button" />
      </form>
<br />  
<ul>
<li><a href="{url_lost_password}">{lang_lost_password}</a></li>
<li><a href="{url_register}">{lang_register}</a></li>
</ul>
<fb:login-button size="small" length="long" autologoutlink="true" perms="email,user_website,publish_stream"></fb:login-button>


User.Logininfo
Code: [Select]
{lang_loggedin_msg}<br /><br />
<ul>
<li><a href="{url_lightbox}">{lang_lightbox}</a></li>
<li><a href="{url_control_panel}">{lang_control_panel}</a></li>
<li><a href="{url_logout}">{lang_logout}</a></li>
</ul>
<fb:login-button size="small" length="long" autologoutlink="true" perms="email,user_website,publish_stream"></fb:login-button>
EDITTTTTTT

Ok I think to managed it for the logo to appear, now, when I click log in with facebook it starts to like log out and log in constantly...try it yourself

www.nonsenseinc.org/gallery/

BTW when I run the facebook_install I get this error:
Error:

ALTER TABLE `4images_users` ADD `fb_userid` VARCHAR(255) NOT NULL, ADD `fl_facebook` ENUM(\'new\',\'normal\',\'registered\') NOT NULL DEFAULT \'registered\'

budduke I thank you very much for your time and help I will surely point out in my website that you helped BIG TIME hahaha
« Last Edit: June 24, 2011, 04:48:08 AM by XIIIX »

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Facebook Connector V1.0
« Reply #121 on: June 26, 2011, 12:44:46 AM »
regarding @XIIIX issues,
The problem seemed to be a firewall issue. Also had to manually add the database fields to database to get it to work.
Buddy Duke
www.budduke.com

Rembrandt

  • Guest
Re: [MOD] Facebook Connector V1.0
« Reply #122 on: June 26, 2011, 05:13:22 AM »
Hi!

@budduke, Before you make continued here, should @XIIIX this read.
http://www.4homepages.de/forum/index.php?topic=29705.msg157871#msg157871

@XIIIX , What should that?

Offline daniel.carneiro

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [MOD] Facebook Connector V1.0
« Reply #123 on: June 26, 2011, 06:11:29 AM »
Hi Guys,

I did all in tutorial. My facebook connector is ok. Somes issues:

1 - My albuns is all private. Only registered user could login and view photos.

2 - When user login with facebook acount, but not registered, facebook login ok, but not access the albuns. Sure! It's ok. However appears the message:

An unexpected error occured. Please try again later.

An unexpected error occured. Please try again later.

An unexpected error occured. Please try again later.

And the rest of the site is ok.

Can I block and only give permissions to certain users log on to facebook account? My settings are for only the user can log in when I release the control panel (no facebook accounts).

3 - When I include manually an user adress that is registered on facebook, the message appears:


An unexpected error occured. Please try again later.

An unexpected error occured. Please try again later.

An unexpected error occured. Please try again later.

Warning: Cannot modify header information - headers already sent by (output started at /home/daniela1/public_html/fotos/includes/db_mysql.php:192) in /home/daniela1/public_html/fotos/includes/sessions.php on line 102

Warning: Cannot modify header information - headers already sent by (output started at /home/daniela1/public_html/fotos/includes/db_mysql.php:192) in /home/daniela1/public_html/fotos/includes/sessions.php on line 102

Warning: Cannot modify header information - headers already sent by (output started at /home/daniela1/public_html/fotos/includes/db_mysql.php:192) in /home/daniela1/public_html/fotos/includes/sessions.php on line 102

Warning: Cannot modify header information - headers already sent by (output started at /home/daniela1/public_html/fotos/includes/db_mysql.php:192) in /home/daniela1/public_html/fotos/includes/functions.php on line 114


If I go back, the message disapears.

4 - If I am a user that have facebook account, I can login in the site. Can I block and only give permissions to certain users log on to facebook account? My settings are for only the user can log in when I release the control panel (no facebook accounts).


Anyone help me?

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Facebook Connector V1.0
« Reply #124 on: June 26, 2011, 02:19:50 PM »
@Rembrandt,
Sorry, did not notice they had the footer missing from their site. I PM'd them.

@daniel.carneiro,
The unexpected error is usually something to do with the database. Either a field that is missing or something along those lines.
Make sure the fb_userid and fl_facebook fields are in your user database in phpadmin.
At this time, no, you can not decide who can login with facebook.
At first, I thought you were wanting the button to only appear to certain users. but why login with facebook if you are already logged in?
I am assuming you want people to login with facebook but get stopped at the registation until you OK it in the admin panel.
I am working on version 2 of this mod. Waiting for facebook to update thier javascript before continueing.(I think they said July)
I have it so the user has to registar after they login and I can easly do the wait till admin approves before continueing.
Buddy Duke
www.budduke.com

Offline daniel.carneiro

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [MOD] Facebook Connector V1.0
« Reply #125 on: June 26, 2011, 03:20:52 PM »
@Rembrandt,
Sorry, did not notice they had the footer missing from their site. I PM'd them.

@daniel.carneiro,
The unexpected error is usually something to do with the database. Either a field that is missing or something along those lines.
Make sure the fb_userid and fl_facebook fields are in your user database in phpadmin.
At this time, no, you can not decide who can login with facebook.
At first, I thought you were wanting the button to only appear to certain users. but why login with facebook if you are already logged in?
I am assuming you want people to login with facebook but get stopped at the registation until you OK it in the admin panel.
I am working on version 2 of this mod. Waiting for facebook to update thier javascript before continueing.(I think they said July)
I have it so the user has to registar after they login and I can easly do the wait till admin approves before continueing.


Ok Budduke. The fb_userid and fl_facebook is in my database. See atachment please.

The error occur when I logged in facebook and I login with my old login (that exists) in my gallery:

Fatal error: Call to a member function getLogoutUrl() on a non-object in /home/daniela1/public_html/fotos/login.php on line 51

If I go back in my browser appears:


DB Error: Bad SQL Query: SELECT * from 4images_users where fb_userid='100000024664271'
Unknown column 'fb_userid' in 'where clause'

DB Error: Bad SQL Query: SELECT * from 4images_users where fb_userid='100000024664271'
Unknown column 'fb_userid' in 'where clause'

DB Error: Bad SQL Query: UPDATE 4images_users set fb_userid='100000024664271' where user_id='1'
Unknown column 'fb_userid' in 'field list'

See in atachaments my archives that appears problem.

Thank you

Offline XIIIX

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: [MOD] Facebook Connector V1.0
« Reply #126 on: June 26, 2011, 05:33:26 PM »
@Rembrandt

Ill put up the footer on my site ! :D
Can anyone log in with facebook to my site?


www.nonsenseinc.org

It seems everytime you log with facebook the index just reloads automatically unless you click log out.

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Facebook Connector V1.0
« Reply #127 on: June 26, 2011, 06:46:46 PM »
@ XIIIX,
I have tested your site on 3 different computers, one xp, one vista, and one win7 with IE and firefox on all of them.
You site seems to be working correctly on all of them. One thing you may be seeing is if you are logged in already with a 4images account and then press the facebook ligin button. It may be logging out the current user (because the e-mail is different) and then logging back on with the facebook user which makes 2 window refreshes.

@ daniel.carneiro,
I see the problem, You have added 2 new tables with those names. You need to add those 2 fields to your 4images_users table.
In phpadmin open up your 4images database, then open up the 4images_users table, then in the sql tab run this command to add those two fields and you should be good.
Code: [Select]
ALTER TABLE 4images_users ADD  (`fb_userid` varchar(255) NOT NULL,`fl_facebook` enum('new','normal','registered') NOT NULL DEFAULT 'registered')Make a backup first just in case...
Buddy Duke
www.budduke.com

Offline daniel.carneiro

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [MOD] Facebook Connector V1.0
« Reply #128 on: June 26, 2011, 07:08:40 PM »
@ XIIIX,
I have tested your site on 3 different computers, one xp, one vista, and one win7 with IE and firefox on all of them.
You site seems to be working correctly on all of them. One thing you may be seeing is if you are logged in already with a 4images account and then press the facebook ligin button. It may be logging out the current user (because the e-mail is different) and then logging back on with the facebook user which makes 2 window refreshes.

@ daniel.carneiro,
I see the problem, You have added 2 new tables with those names. You need to add those 2 fields to your 4images_users table.
In phpadmin open up your 4images database, then open up the 4images_users table, then in the sql tab run this command to add those two fields and you should be good.
Code: [Select]
ALTER TABLE 4images_users ADD  (`fb_userid` varchar(255) NOT NULL,`fl_facebook` enum('new','normal','registered') NOT NULL DEFAULT 'registered')Make a backup first just in case...


You're a genious! It's ok now. Allright! Thank you man!

Offline XIIIX

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: [MOD] Facebook Connector V1.0
« Reply #129 on: June 26, 2011, 08:28:50 PM »
@budduke

Hmmm Maybe its because Im using a MAC. I tried using firefox & safari but it seriously just reloads endlessly...

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Facebook Connector V1.0
« Reply #130 on: June 26, 2011, 09:13:25 PM »
@budduke

Hmmm Maybe its because Im using a MAC. I tried using firefox & safari but it seriously just reloads endlessly...

I have a mac at work I can try out tomorrow and will let you know what happens...
Buddy Duke
www.budduke.com

Offline XIIIX

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: [MOD] Facebook Connector V1.0
« Reply #131 on: June 27, 2011, 04:51:51 PM »
FIXED-------The page kept reloading because the clock was off I didn't realize this until I looked at it at 3am and it said it was 1pm hahahaha


:D

Offline bma2004

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: [MOD] Facebook Connector V1.0
« Reply #132 on: June 29, 2011, 09:21:48 AM »

UPDATE:
maybe found error in one of my pages...
Can you test this for me?
in the facebook\fbstatus.php file
look for
Code: [Select]
$tempuser = preg_replace("/[^a-z0-9]/i","",strtolower( $fbme['first_name'].$fbme['last_name'] ));replace with
Code: [Select]
//$tempuser = preg_replace("/[^a-z0-9]/i","",strtolower( $fbme['first_name'].$fbme['last_name'] ));
$tempuser= un_htmlspecialchars(trim(strtolower( $fbme['first_name'].$fbme['last_name'] )));
$tempuser=ereg_replace("( ){2,}", " ", $tempuser);

Can you let me know if that fixes your issue or not?

I have a similar problem, in this way it is not decided.

Name and Surname on Facebook - in Russian.

After using your method - can be written on DataBase, but unreadable symbols.

how to solve this problem?


Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: [MOD] Facebook Connector V1.0
« Reply #133 on: June 30, 2011, 12:04:01 AM »
@ bma2004,
I do not know russian at all so it is hard for me to test this.
I am assuming in your attached image. The correct spelling is under the Welcome, area
Is the incorrect version the bold letters above the picture after the ":" ?

Are you able to create a russian user in the normal 4images registration area using the spelling under the Welcome message and get it to display correctly?
That will tell me if it is the mod or deeping into 4images.

I am going to have to figure out how I can type russian letters so I can test this further.
Buddy Duke
www.budduke.com

Offline bma2004

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: [MOD] Facebook Connector V1.0
« Reply #134 on: June 30, 2011, 02:37:53 PM »
@ bma2004,
I do not know russian at all so it is hard for me to test this.
I am assuming in your attached image. The correct spelling is under the Welcome, area
Is the incorrect version the bold letters above the picture after the ":" ?
Are you able to create a russian user in the normal 4images registration area using the spelling under the Welcome message and get it to display correctly?
That will tell me if it is the mod or deeping into 4images.

I am going to have to figure out how I can type russian letters so I can test this further.
Users registered in the usual way - write to the database and displayed normal.
If you change the entry to the database "username" by typing the name correctly, it displays everything correctly.


UPD
put a line echo($fbme['first_name']) at the beginning fbstatus.php.

result - the variable is initially displayed with unreadable characters :(
« Last Edit: June 30, 2011, 04:16:21 PM by bma2004 »